Using hardware codec element in Android
JYbob
jinyoung.noh at lge.com
Fri Apr 25 02:49:43 PDT 2014
Hi , I'm trying to use hardware codec element in Android.
I saw this mail
http://lists.freedesktop.org/archives/gstreamer-android/2013-October/000629.html
<http://lists.freedesktop.org/archives/gstreamer-android/2013-October/000629.html>
and I commanded like this on my board(freescale),
# cat media_codecs.xml
<Decoders>
<MediaCodec name="OMX.Freescale.std.video_decoder.mpeg4.hw-based"
type="video/mp4v-es" >
<Quirk name="requires-allocate-on-output-ports" />
</MediaCodec>
<MediaCodec name="OMX.Freescale.std.video_decoder.h263.hw-based"
type="video/3gpp" >
<Quirk name="requires-allocate-on-output-ports" />
</MediaCodec>
<MediaCodec name="OMX.Freescale.std.video_decoder.avc.v3.hw-based"
type="video/avc" >
<Quirk name="requires-allocate-on-output-ports" />
</MediaCodec>
<MediaCodec name="OMX.Freescale.std.video_decoder.vpx.hw-based"
type="video/x-vnd.on2.vp8" >
<Quirk name="requires-allocate-on-output-ports" />
</MediaCodec>
<MediaCodec name="OMX.google.mp3.decoder" type="audio/mpeg" />
<MediaCodec name="OMX.google.amrnb.decoder" type="audio/3gpp" />
<MediaCodec name="OMX.google.amrwb.decoder" type="audio/amr-wb" />
<MediaCodec name="OMX.google.aac.decoder" type="audio/mp4a-latm" />
<MediaCodec name="OMX.google.g711.alaw.decoder"
type="audio/g711-alaw" />
<MediaCodec name="OMX.google.g711.mlaw.decoder"
type="audio/g711-mlaw" />
<MediaCodec name="OMX.google.vorbis.decoder" type="audio/vorbis" />
<MediaCodec name="OMX.google.mpeg4.decoder" type="video/mp4v-es" />
<MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" />
<MediaCodec name="OMX.google.h264.decoder" type="video/avc" />
<MediaCodec name="OMX.google.vpx.decoder" type="video/x-vnd.on2.vp8"
/>
</Decoders>
...
I think <MediaCodec name="OMX.Freescale.std.video_decoder.avc.v3.hw-based"
type="video/avc" > is hardwaredecoder.
but when I execute my bianary files to check decoder elements, the source
code was :
...
GList *elements = gst_element_factory_list_get_elements
(GST_ELEMENT_FACTORY_TYPE_DECODER, GST_RANK_NONE);
GList *l;
for (l = elements; l; l = l->next) {
GstElementFactory *f = l->data;
g_print ("factory: %s\n", GST_OBJECT_NAME (f));
}
gst_plugin_feature_list_free (elements);
..
the result was :
factory:adpcmdec
factory:alawdec
factory:flacdec
factory:flxdec
factory:jpegdec
factory:katedec
factory:mulawdec
factory:ogmaudioparse
factory:ogmtextparse
factory:ogmvideoparse
factory:opusdec
factory:pngdec
factory:pnmdec
factory:schrodec
factory:speexdec
factory:theoradec
factory:vorbisdec
factory:vp8dec
factory:wavpackdec
factory:amcauddec-omxgoogleaacdecoder
factory:amcauddec-omxgoogleamrnbdecoder
factory:amcauddec-omxgoogleamrwbdecoder
factory:amcauddec-omxgooglemp3decoder
factory:amcviddec-omxgoogleh263decoder
factory:amcviddec-omxgoogleh264decoder
factory:amcviddec-omxgooglempeg4decoder
factory:amcviddec-omxgooglevpxdecoder
factory:ivorbisdec
factory:dvdec
factory:sirendec
factory:decodebin
factory:uridecodebin
there was noting about harware decoder.
and I knew that decodebin is automatically find decoder and use it. so, I
make the pipeline like this
gst_parse_launch(filesrc location=/data/sample.h264 ! queue ! h264parse !
queue ! decodebin ! autovideosink);
I check GST_DEBUG=4 to check more specific.
the result was
0:00:01.046712667 3488 0x42082600 INFO amc
gstamc.c:1668:scan_codecs: Checking codec
'OMX.Freescale.std.video_decoder.avc.v3.hw-based'
0:00:01.046931667 3488 0x42082600 INFO amc
gstamc.c:1690:scan_codecs: Skipping non-Google codec
'OMX.Freescale.std.video_decoder.avc.v3.hw-based' in standalone mode
0:00:01.756036001 3488 0x43249830 INFO GST_STATES
gstbin.c:2656:gst_bin_change_state_func:<decodebin0> child
'amcvideodec-omxgoogleh264decoder0' changed state to 4(PLAYING) successfully
they know that there is hardware decoder, but decodebin finally matched the
cviddec-omxgoogleh264decoder.
Please help~
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Using-hardware-codec-element-in-Android-tp4666607.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list