TurboMagic 92 Posted August 14, 2020 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')) Share this post Link to post
Dave Nottage 557 Posted August 14, 2020 2 hours ago, TurboMagic said: Is .\assets\internal the right path to use when adding this file to deployment manager? You could use that one, however if you have versions for both 32-bit and 64-bit (or just one of either) you might want to deploy to: library\lib\armeabi-v7a library\lib\arm64-v8a For 32-bit and 64 bit respectively, and use: LoadLibrary(TPath.Combine(TPath.GetLibraryPath, 'test.so')) Share this post Link to post
TurboMagic 92 Posted August 14, 2020 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 Share this post Link to post
TurboMagic 92 Posted August 15, 2020 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? FFMPEGMultiDemo.zip Share this post Link to post
TurboMagic 92 Posted August 15, 2020 If somebody likes to have the shared objects used by the above demo unzip this attachment here into the project folder. FFMultiDemoLibraries.zip 1 Share this post Link to post
TurboMagic 92 Posted August 29, 2020 By the way: the whole thing is now available here: https://github.com/rmesch/Bitmaps2Video Android 64 bit support for the sample provided should be available soon, I need to commit it and create a pull request. Which I'll do in a minute. 1 Share this post Link to post
Dave Nottage 557 Posted August 29, 2020 Did you resolve the apparent permissions issue? Share this post Link to post
TurboMagic 92 Posted September 4, 2020 Yes, I resolved it by upgrading the student to 10.3.3 and then using the permission request solution provided there. It works now and if you check the github repo you'll see it's in there as well 😉 So if you need to create a video on Android you can use that solution right away 😉 The only thing missing there is an iOS implementation as I don't have any iPhone and Mac. 1 Share this post Link to post