how to use android media codecs in gst pipelines

Sebastian Dröge slomo at circular-chaos.org
Fri Oct 11 01:22:45 PDT 2013


On Do, 2013-10-10 at 17:25 +0200, Francesco Argese wrote:
> Hello,
> 
> 
> 2013/10/10 Sebastian Dröge <slomo at circular-chaos.org>
> 
> > The names of the amvcviddec-* elements are based on the codec names
> > in /etc/media_codecs.xml to prevent conflicts. You ideally use something
> > like encodebin and decodebin to automatically select the best possible
> > element for you, or implement your own logic around the
> > GstElementFactory API to select the best suitable element.
> >
> 
> I have found the file media_profiles.xml in my /etc/ folder (among
> attachments.  Is it the same of /etc/media_codecs.xml?
> 
> In row 31 of the file I read:
> 
>   <!ATTLIST Video codec (h264|h263|m4v) #REQUIRED>
> 
> so I thought that gst element would be amcviddec-m4v for mpeg decoder. I
> have tried it but element is not found by the app.

It's not the same file, no :) Does your device run Jelly Bean or newer?
Some vendors put the file into a different place.

Anyway, as said, use the GstElementFactory API, e.g.
gst_element_factory_list_get_elements() and
gst_element_factory_list_filter().

> decodebin2 seems to work(but I cannot be sure that it's using android media
> codec.

You should consider updating to 1.2.0, the 0.10 version of GStreamer is
not maintained anymore since almost 2 years. See here:
http://gstreamer.freedesktop.org/data/pkg/android/1.2.0/

Also see attached patch for the tutorial 5 to see what changes are
necessary.


You can check the GStreamer debug logs for example to see which decoder
element is used by decodebin.

> > Nothing that only uses public Android API. You should however be able to
> > use gst-omx with Tegra, and directly use the OpenMAX IL implementation
> > available for this SoC. It should be present on your Android device, you
> > just need to write the appropiate configuration file for gst-omx for it.
> >
> 
> How can I see if it is present on my Android device? Which file should be
> written for gst-omx? I have found related documentation only for specific
> devices but not for Android devices.

You need to write a gstomx.conf, if you check the GIT repository of
gst-omx you'll see a configuration file for the Raspberry Pi there.
You'll have to write something similar for Tegra, but what exactly gets
in there completely depends on your device. I can't help you with that
without access to the device.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tut5.diff
Type: text/x-patch
Size: 6588 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-android/attachments/20131011/8eeb02a7/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-android/attachments/20131011/8eeb02a7/attachment-0001.pgp>


More information about the gstreamer-android mailing list