How to tell decodebin2 to use h264parse when there are not enough caps?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to tell decodebin2 to use h264parse when there are not enough caps?

Sandino Flores Moreno
Hello, I'm working in an h264 element (my_h264_dec) that assumes
width, height and framerate (W,H,F) are supplied.
Hence, they are specified in its template caps.

It works well with local files and playbin2 since the demuxer provides
all the required caps.

However, when using rtsp, the h264 depayloader (rtph264depay) does not
provide (W,H,F).
In a manual pipeline, in order to make it work, I have to do this:

gst-launch  rtspsrc location=$URI name=source \
source. ! queue ! rtph264depay ! h264parse !  my_h264_dec ! videosink

However, decodebin2 and playbin2 tend to omit the parser.

How can I tell decodebin2 to use the parser when there are not
(W,H,F) present in the caps?

Thanks in advance.

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to tell decodebin2 to use h264parse when there are not enough caps?

Marco Ballesio
Hi,

On Wed, Nov 17, 2010 at 5:45 PM, Sandino Flores Moreno <[hidden email]> wrote:

> Hello, I'm working in an h264 element (my_h264_dec) that assumes
> width, height and framerate (W,H,F) are supplied.
> Hence, they are specified in its template caps.
>
> It works well with local files and playbin2 since the demuxer provides
> all the required caps.
>
> However, when using rtsp, the h264 depayloader (rtph264depay) does not
> provide (W,H,F).
> In a manual pipeline, in order to make it work, I have to do this:
>
> gst-launch  rtspsrc location=$URI name=source \
> source. ! queue ! rtph264depay ! h264parse !  my_h264_dec ! videosink
>
> However, decodebin2 and playbin2 tend to omit the parser.
>
> How can I tell decodebin2 to use the parser when there are not
> (W,H,F) present in the caps?

I was thinking to something similar after a similar question posted a
few days ago on this ML.

In a theoretical way (I never tried it) you could write an element
composed by a bin containing, in the sequence, the parser and your
decoder. If given the proper rank and properly registered to the
GStreamer plugin system (see the plugin writer's guide) such an
element should be automatically picked up by the playbin2 when needed
and would work as you're expecting.

Indeed this would not be the better performing solution, but may
indeed be a (quick and dirty) way to get the things working when you
really can't change your decoder.

Regards

>
> Thanks in advance.
>
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
> Spend less time writing and  rewriting code and more time creating great
> experiences on the web. Be a part of the beta today
> http://p.sf.net/sfu/msIE9-sfdev2dev
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel