GNOME Bugzilla – Bug 748489
Improve Android versions support
Last modified: 2018-11-03 10:19:17 UTC
Created attachment 302386 [details] [review] Patch to apply to add more Android versions support Please find attached a patch to give the ability to have more Android versions support. The variable target_android_distro_version is used in the cerbero build process to give control to the developer on the Android target to use as indicated below in the user cerbero.cbc # Targeted minimum android version target_android_distro_version = DistroVersion.ANDROID_LOLLIPOP_5_1
Is there any specific reason to add all these?
We are working on a project and we need to ensure to have GStreamer to be supported on a large range of Android versions, and this is to cover this even we could consider the list of Android platform currently supported in GStreamer to be enough. We are currently doing some work to use GStreamer for video playback in an application, and the plan is to send all patches of the work we are doing.
This only changes which version GStreamer is built against though. We don't use any native API that is newer than android-9, so it shouldn't really make a difference. Or am I missing something here?
Review of attachment 302386 [details] [review]: The patch itself is (almost) ok though of course, just wondering what your use case is :) Also looking forward to seeing your other patches :) ::: cerbero/bootstrap/android.py @@ +36,3 @@ if not os.path.exists(os.path.join(dest, "README.TXT")): + ndk_tar = self.NDK_TAR % (self.config.platform, self.config.arch) + tar = os.path.join(dest, ndk_tar) This part should be in a different commit ::: cerbero/enums.py @@ +107,3 @@ + ANDROID_ECLAIR_2_1 = 'android_eclair_2_1' # API Level 7 + ANDROID_FROYO = 'android_froyo' # API Level 8 + ANDROID_GINGERBREAD_2_3_2 = 'android_gingerbread_2_3_2' # API Level 9 Versions before API level 9 are not going to work, we use some APIs that were introduced with 9. So not much point in keeping 8 and before around here :) ::: config/cross-android-arm64.cbc @@ +12,3 @@ +if target_android_distro_version: + m.message(_("Minimum Android platform support specified to be %s" % target_android_distro_version)) + target_distro_version = target_android_distro_version You could also reuse target_distro_version here, check if it was set already and otherwise fall back to the default. No need to add another configuration
Sebastian, > The patch itself is (almost) ok though of course, just wondering what your use case is :) > Also looking forward to seeing your other patches :) Yes, you would. Sorry for that but hopefully you would see the change across the different patches we will send through. It is possible in re. to the version support we have gone too far, though this is just in case for us to ensure we can target easily a specific version of Android as we may encounter it during our development work. Regarding the target_android_distro_version, we would like to give ability from a developer prospective (an because the team I am directed may target different Android versions during the development) to change in its environment a specific version of Android he may need to test. This is more as a facility for the developer to achieve that quite easily from a single common tree used in the team. Best regards, Emmanuel Poitier
Ok, that makes sense. I'll wait for those other patches then :) Can you update the patch to split the two different changes, and also remove the pre android-9 versions? For the target_android_version thing. You should be able to just locally set a different target_distro_version in your ~/.cerbero/cerbero.cbc or some other config.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/cerbero/issues/17.