Prioritize hardware decoder for playbin2

Soeren Grunewald soeren.grunewald at avionic-design.de
Thu Feb 21 07:55:02 PST 2013


Hi Jim,

You can try and play with the playbin2 flags [1] e.g. set them to 0x163. 
I remember that this solves my problem when I tried to use the openmax 
plug-ins.
You can also try to use GST_DEBUG_DUMP_DOT_DIR [2] to visualize you 
pipeline. This also might help you to figure out what went wrong.
--
Regards,
Soeren


[1] 
http://gstreamer.freedesktop.org/data/doc/gstreamer/0.10.36/gst-plugins-base-plugins/html/gst-plugins-base-plugins-playbin2.html#GstPlayFlags

[2] http://gstreamer.freedesktop.org/wiki/DumpingPipelineGraphs


On 02/19/2013 07:07 PM, Jim wrote:
> Hi Tim,
> Here's the output of gst-inspect for the hardware decoder. I missed it
> before but I now see it has a rank of GST_RANK_PRIMARY+1, which I would
> assume is high enough to be selected, but from what you said, it sounds like
> there's more to it than just the rank.
>
> Factory Details:
>    Long name:	VPU-based video decoder
>    Class:	Codec/Decoder/Video
>    Description:	Decode compressed video to raw data by using VPU
>    Author(s):	Multimedia Team <shmmmw at freescale.com>
>    Rank:		primary + 1 (257)
>
> Plugin Details:
>    Name:			vpu.imx
>    Description:		VPU-based video codec
>    Filename:		/usr/lib/gstreamer-0.10/libmfw_vpu.so
>    Version:		3.0.1
>    License:		LGPL
>    Source module:	gst-fsl-plugins
>    Binary package:	Freescle Gstreamer Multimedia Plugins
>    Origin URL:		http://www.freescale.com
>
> GObject
>   +----GstObject
>         +----GstElement
>               +----GstVpuDec
>
> Pad Templates:
>    SINK template: 'sink'
>      Availability: Always
>      Capabilities:
>        video/mpeg
>              mpegversion: 4
>        video/x-h264
>        video/x-h263
>        video/mpeg
>             systemstream: false
>              mpegversion: { 1, 2 }
>        video/x-wmv
>               wmvversion: 3
>                   format: WVC1
>        video/x-wmv
>               wmvversion: 3
>        video/x-xvid
>        video/x-vp8
>        image/jpeg
>
>    SRC template: 'src'
>      Availability: Always
>      Capabilities:
>        video/x-raw-yuv
>                   format: NV12
>        video/x-raw-yuv
>                   format: I420
>        video/x-raw-yuv
>                   format: YV12
>        video/x-raw-yuv
>                   format: TNVP
>        video/x-raw-yuv
>                   format: TNVF
>
>
> Element Flags:
>    no flags set
>
> Element Implementation:
>    Has change_state() function: gst_vpudec_state_change
>    Has custom save_thyself() function: gst_element_save_thyself
>    Has custom restore_thyself() function: gst_element_restore_thyself
>
> Element has no clocking capabilities.
> Element has no indexing capabilities.
> Element has no URI handling capabilities.
>
> Pads:
>    SRC: 'src'
>      Implementation:
>        Has custom eventfunc(): gst_vpudec_src_event
>        Has custom queryfunc(): gst_pad_query_default
>        Has custom iterintlinkfunc(): gst_pad_iterate_internal_links_default
>        Has getcapsfunc(): gst_pad_get_fixed_caps_func
>        Has acceptcapsfunc(): gst_pad_acceptcaps_default
>      Pad Template: 'src'
>    SINK: 'sink'
>      Implementation:
>        Has chainfunc(): gst_vpudec_chain
>        Has custom eventfunc(): gst_vpudec_sink_event
>        Has custom queryfunc(): gst_pad_query_default
>        Has custom iterintlinkfunc(): gst_pad_iterate_internal_links_default
>        Has setcapsfunc(): gst_vpudec_setcaps
>        Has acceptcapsfunc(): gst_pad_acceptcaps_default
>      Pad Template: 'sink'
>
> Element Properties:
>    name                : The name of the object
>                          flags: readable, writable
>                          String. Default: "vpudec0"
>    low-latency         : set low latency mode enable/disable for streaming
> case
>                          flags: readable, writable
>                          Boolean. Default: false
>    framerate-nu        : set framerate numerator
>                          flags: readable, writable
>                          Integer. Range: 1 - 2147483647 Default: 30
>    framerate-de        : set framerate denominator
>                          flags: readable, writable
>                          Integer. Range: 1 - 2147483647 Default: 1
>    framedrop           : enable adaptive frame drop for smoothly playback
>                          flags: readable, writable
>                          Boolean. Default: true
>    frame-plus          : set number of addtional frames for smoothly playback
>                          flags: readable, writable
>                          Integer. Range: 1 - 2147483647 Default: 6
>    output-format       : set raw format for output
>                          flags: readable, writable
>                          Enum "vpudec_outputformat" Default: 0, "auto"
>                             (0): auto             - auto
>                             (1): i420             - I420
>                             (2): yv12             - YV12
>                             (3): nv12             - NV12
>                             (4): tile             - tiled format
>                             (5): tilefield        - tiled field format
>    framedrop-level-mask: set enable mask for drop policy 0x100: drop B/P
> frame; 0x200: drop B frame; 0xff mask of frame not display
>                          flags: readable, writable
>                          Unsigned Integer. Range: 0 - 1023 Default: 1023
>    experimental-tsm    : enable/disable experimental timestamp algorithm
>                          flags: readable, writable
>                          Boolean. Default: true
>    profile             : enable profile on vpudec
>                          flags: readable, writable
>                          Boolean. Default: false
>
>
> Thanks,
> Jim
>
> -----Original Message-----
> From:
> gstreamer-devel-bounces+restlessmindsstudio=gmail.com at lists.freedesktop.org
> [mailto:gstreamer-devel-bounces+restlessmindsstudio=gmail.com at lists.freedesk
> top.org] On Behalf Of Tim-Philipp Müller
> Sent: Tuesday, February 19, 2013 10:49 AM
> To: gstreamer-devel at lists.freedesktop.org
> Subject: Re: Prioritize hardware decoder for playbin2
>
> On Tue, 2013-02-19 at 10:39 -0700, Jim wrote:
>
> Hi,
>
>> Thanks for the reply. I was able to set the rank using the functions
>> you listed. But even after setting the rank to GST_RANK_PRIMARY + 2,
>> playbin2 is still not using the hardware decoder. I guess I'll have to
>> keep poking around.
>
> There are more things that need to be set right.
>
> The element factory class needs to have the right tags in it, and the
> template caps need to be correct.
>
> Perhaps you could paste the output of gst-inspect $yourdecoder ?
> (removing any specifics/names from the output if necessary).
>
> Cheers
>   -Tim
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>



More information about the gstreamer-devel mailing list