

TurboMagic
-
Content Count
255 -
Joined
-
Last visited
-
Days Won
9
Posts posted by TurboMagic
-
-
If somebody likes to have the shared objects used by the above demo unzip this attachment here into the project folder.
-
1
-
-
Ok, I got the libraries loaded, at least in a 32 bit version, which is sufficient at the moment.
But now I'm stuck on a permission error where I don't know what kind of permission is meant.
The problem is calling this function:
ret := avcodec_open2(c, codec, @CodecSetup.OptionsDictionary);
in UBitmaps2VideoM's construktor.It always returns -13 which means permission error, but I don't know which kind of permission is meant.
I already tried two different output paths and had added Android 8 style external write permission requesting,
but to no avail.The paths tried are:
GetSharedDownloadsPath
GetDocumentsPath
Has anybody any clue?
-
The shared objects I have are for armeabi-v7a afaik.
For a first test a 32 bit build of the app would be sufficient.
But would this mean I need a 2nd set of .so files for a 64 bit version?
The files we have are from here:
https://github.com/PassByYou888/FFMPEG-Header/tree/master/BinaryLibrary
-
Hello,
given I wanted to distribute a shared object file with map Android app which I need to load dynamically in order to use it.
Where would/should I place this on the device?
Is .\assets\internal the right path to use when adding this file to deployment manager?
If not which is the correct path?
When loading it I'd use LoadLibrary like for a DLL, right?
And if so, would I use this call for that, give the file name would be test.so?
LoadLibrary(TPath.Combine(TPath.Combine('assets', 'internal'), 'test.so'))
-
For us it is sufficient to swap color of a rectangle.
Today we tried something with the bitmap of a TImage which has a clear method where you can specify the new color.
That might be sufficient, if the timer would be more jitter free. Thus we call it from a secondary thread as TBitmap is thread-safe nowadays.
Question is how to "time" such a thread on Android precisely enough?
Do busy waiting with TStopWatch until the necessary time is elapsed?
Or is there something better?
-
Thanks for this reply.
In German Delphipraxis somebody posted this link:
https://developer.android.com/games/develop/gameloops
But I couldn't find any Delphi implementation yet. It seems to integrate deep into OpenGL or Vulkan.
-
For some research we need to create an Android app with a precisely timed output of colored rectangles/bars.
Unfortunately TTimer has a too big jitter.
I need a low interval (if possible < 10ms) and unless my code in the timer event runs for longer than the interval
the timer events should come precisely and not sometimes after 10ms (given a 10ms interval is set) and sometimes
after 11 or 12 ms). -
Better get rid of with in your code where possible...
Nick Hodges back then even wanted to deprecate with so I wouldn't expect EMBT to invest much time in improving the debugger in this area.
I guess there are things waiting to be done with more worth for us developers... -
Hello,
I'm using the TChart wich comes with 10.3.3 out of the box.
I managed to add a 2nd right hand vertical axis via the TChart design editor, but I can neither there nor in code set min and max,
at least they will always be ignored and min will always be 0 and max 64000 or 65535.
I need -4090 and +4095 as min and max.
Here is the variant where I tried to change them in code:
ChartCurrentValues.Axes.Right.SubAxes[0].AutomaticMaximum := false; ChartCurrentValues.Axes.Right.SubAxes[0].AutomaticMinimum := false; ChartCurrentValues.Axes.Right.SubAxes[0].Automatic := false; ChartCurrentValues.Axes.Right.SubAxes[0].SetMinMax(-4096, 4096); ChartCurrentValues.Series[cMySeries1].CustomVertAxis := ChartCurrentValues.Axes.Right.SubAxes[0]; ChartCurrentValues.Series[cMySeries2].CustomVertAxis := ChartCurrentValues.Axes.Right.SubAxes[0];
-
Hello,
I'm using D10.3.2 and this time I do something looking a bit strange. It works except for one thing.
I want to include sort of 2 applications (a main one and a small one sharing some code and the
language ressource dlls of the main one).For this in the DPR I check if a certain command line parameter has been passed. If not the main app will
be started otherwise the small one. Here's some code:Quotevar
App: TApplication; // the normal Application variable is assigned to this one
// as this prevents the IDE from messing around in the dpr
begin
App := Application;App.Initialize;
App.Title := 'MyApp';
App.HelpFile := 'MyHelp.chm';
if not ParamStr(1) = '/Test' then
begin// calling the normal app works fine
SetCurrentDir(ExtractFilePath(ParamStr(0)));App.CreateForm(TData, Data); // ein Datenmodul
App.CreateForm(Tf_Main, f_Main);
end
else
begin// calling the secondary app works, but produces a 2nd taskbar icon,
// where does it come from and how to prevent?
SetCurrentDir(ExtractFilePath(ParamStr(0)));App.Icon.LoadFromResourceName(HInstance, 'MyIcon');
App.CreateForm(Tf_AlternateMain, f_AlternateMain);
end;App.Run;
end.So where does the 2nd taskbar icon in the one case come from and how to get rid of it?
Regards
TurboMagic
-
Thanks for that hint, we'll do that later. First we try to run this project on a different machine to see if it happens there as well.
-
Neither ExitProcess nor TerminateProcess could be found in this project.
-
Thanks for this tip. Result of that in the dpr is: false.
-
I'll check this, but I doubt it as it is a VCL application. How can I check this? {$AppType CONSOLE}?
-
I would also expect that they are reported to me and in other big applications I have they actually are, but not in this one and reducing this might not be so easy.
@Attila: what in my finalization sections could trigger a silend exit process? Do y<ou have any examples so I know what to look for?
-
Ahem, the following code I had used to test will leak:
var
sl : TStringList;
begin
sl := TStringList.Create;
sl.Add('This will leak David!');
sl.Add('This will leak David!');
end;
See: no free, thus it will leak at least one TStringList.
I had even put that construct into the dpr and put an exit after the last Add call, so the application quit immediately. But it didn't show any message box.
Ok, doing that in the dpr and thus not running any VCL initialisation made in the dpr's main code migt be problematic for showing a message box,
but the code above was in the FormClose event of the main form and got called! -
I do know that leak reporting normally works, but it doesn't in this specific project. The project is a bigger one with
a 5-digit number of LOC so creating a minimal demo, as much as I understand why you want it, is not so easy.Are there any known issues which can interfere with it?
We already checked and confirmed that there is only one ReportMemoryLeaksOnShutdown := true; line as first line
in the dpr's main program.We also tried FastMM491 and included FastMM4 ias first unit in the dpr's uses clause, but it didn't change anything.
We also had tried V4.97, but that did not compile. There was some data type mismatch somewhere. -
41 minutes ago, David Heffernan said:Nothing has gone wrong with FastMM and memory leak reporting works fine.
How's that?
Will creating some object in FormClose but not freeing it there not leak?
-
Hello,
we have a Tokyo based Win32 project where ReportMemoryLeaksOnShutdown := true; as first line in the dpr does not lead to any leaks being reported on shutdown of the program,
even if we force a leak in FormCLose of the main form (we can prove that the lines are executed there.
In a small test application memory leak reporting works fine.
What can this be?
In the same project something has gone wrong with FastMM4 anyway. Small rpointer of records (size 12 bytes) do consume over 1K RAM each!
Any clue what this could be? If extracted into the small test project it doesn't consume too much RAM. Same data type, same loop etc.
Best regards
TurboMagic
-
Yes, Android 8.0 has debugging issues due to some messed up permission by Android. Android 8.1 is fixed. That's nothing EMBT is guilty of.
-
On 5/1/2019 at 10:08 AM, Dalija Prasnikar said:Android officially does not have splash screen support. Various frameworks only simulate splash screen while they load... so just use sizes Delphi asks and that should be it,
The best is to use simple logo centered on black background (similar to default FMX splash). It is the least intrusive and will look good on various setups. If your application needs longer initialization, then make main FMX form as light as possible and then implement proper splash inside that can show progress and can be better customized.
The problem is, that it's not me who decides how the splash screen looks like. The other app is done in a different technology and uses different resolutions, so it's a bit hard for me to design a splash screen which looks similar enough from the logo and icon sizes of these elements on the splash screen. It would be a further argument for unification of development tools. Sigh!
-
Hello,
thanks for the links provided.
Some questions:
You talk about approved image sizes and when I look at the path mentioned by you I see the resolutions the IDE project settings offer.
But what does approved mean? Approved by whom? EMBT or Android or...?
Or asked differently: why does a different development environment use different sizes?
Who approved those? 😉
Isn't there some official standard as it is standard to have these ldpi, mdpi, hdpi etc. folders in the apk containing the various resolutions,
but aren't those resolutions "fixed" somewhere? -
Hello,
some question regarding Android splash screens. Delphi defines exact pixel sizes for these graphics.
But where do they come from? Some colleague has written an app (in some web app framework)
which uses completely different resolutions for those splash screens and if one tries to make similar
looking one for my app this is quite cumbersome.These are the resolutions used by the other framework:
200x320
320x480
480x800
720*1280
960*1600
1280x1920TurboMagic
-
Can you find out in which Delphi version it still worked and compare the source then?
Problem with Delphi RIO 10.3.3 and Google API Level 29
in Cross-platform
Posted
Hello,
what please does "the app crashes" mean?
Is there any failure message? If yes , which?
Can you run monitor.bat from your Android SDK?
With that you can see the logcat log of your device. Run the app then until it crashes
and look at the log. Maybe there are helpful messages in it.
Have you looked into QP for any reports regarding this? Does one exist?
The app that you tried, was this created new in 10.3.3 or is it updated from some earlier version?
If the latter it might help to delete AndroidManifestTemplate and let the IDE regenerate it.
Then change targetSDKVersion. Maybe there were other changes in it as well.
Does the crash happen with a blank FMX app created in 10.3.3 as well?
Regards
TurboMagic