GNOME Bugzilla – Bug 768264
amcvideodec: Expose non-GL formats on Lollipop+
Last modified: 2018-11-03 13:52:52 UTC
Before Lollipop, the only way to know which format a decoder would decode into was to start decoding, and then just before getting the first frame, we could get the format. Since Lollipop, you can get the output format by just doing a configure(), this only requires the mime type of the codec and the resolution. I've tried just using 640x480 as I assume all machines should do that. The second assumption is that the output format is the same irrelevant of the resolution. This also means that although a decoder can in theory output many formats, we can know exactly which one it will output for each input format.
Just as I'm attaching the patches, I'm thinking that maybe we should also move the gl_output_only flag to be per input format.
Created attachment 330692 [details] [review]
androidmedia: Retrieve SDK version number
This way version specific behaviour can be implemented.
Created attachment 330693 [details] [review]
androidmedia: Check decoder formats directly if possible
On Android Lollipop and newer, it is possible to call configure() and
then get the output format directly. The configure() call only needs the
mime type and the resolution. If we assume that the color format will be
the same at any resolution, then we can just create a "fake" 640x480
color format and then use that to get the color format that the decoder
will really produce. This should make it safe to enable non-GL output
even when the decoder also exposes private formats.
Created attachment 330694 [details] [review]
androidmedia: Only expose real actual chosen format if available
On Lollipop, we can figure out which color format are really available,
so expose only those in the src caps instead of all possible caps as
we do on other elements. This should help auto-plugging a little.
I should mention that I've tested on Nexus 6P (Qualcomm Snapdragon 810), Galaxy S6 (Exynos 7420), Nexus 4 (Snapdragon S4 Pro) and Nexus 9 (Tegra K1).
-- 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/gst-plugins-bad/issues/405.