video decoder and video sink plugins not negotiating using playbin

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

video decoder and video sink plugins not negotiating using playbin

ajay kumar
Hi,

I'm beginner to gstreamer, and am developing a customized h264 video decoder and video sink plugins. These plugins are working with 'gst-launch-0.10'

gst-launch-0.10 filesrc location=/multimedia_samples/sample_onlyvideo.mp4 ! qtdemux name=demux demux.video_00 ! ajayh264dec ! ajayvidsink

But with 'playbin', the elements are not negotiating.

 gst-launch playbin video-sink='ajayvidsink' uri=file:///multimedia_samples/sam
ple_onlyvideo.mp4 -v

Below is the 'log' received for above play bin command.

Setting pipeline to PAUSED ...
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = video/quicktime, variant=(string)iso
Pipeline is PREROLLING ...
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0.GstPad:sink: caps = video/quicktime, variant=(string)iso
/GstPlayBin:playbin0/GstStreamSelector:selector_video_src0: active-pad = NULL

 Ajayvidsink:start/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string0
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)0

mine: pad = sinkpad
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/Gstajaydec:ajaydec0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(st0

ajaydec: decoding h264/GstPlayBin:playbin0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, le0
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/Gstajaydec:ajaydec0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(str0
/GstPlayBin:playbin0/GstStreamSelector:selector_video_src0.GstPlaybinSelectorPad:sink0: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au,0
/GstPlayBin:playbin0/GstDecodeBin:decodebin0.GstGhostPad:src0.GstProxyPad:proxypad2: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, le0
/GstPlayBin:playbin0/GstStreamSelector:selector_video_src0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)3.0
/GstPlayBin:playbin0/GstQueue:preroll_video_src0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)3.1, profil0

ajaydec: decoding h264
ajaydec: decoding h264
ajaydec: decoding h264
ajaydec: decoding h264
ajaydec: decoding h264/GstPlayBin:playbin0/GstQueue:preroll_video_src0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, leve0

ajaydec: decoding h264
ajaydec: decoding h264ERROR: from element /GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0: GStreamer encountered a general stream error.
Additional debug info:
qtdemux.c(3865): gst_qtdemux_loop (): /GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0:
streaming stopped, reason not-negotiated
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...

Ajayvidsink:stop/GstPlayBin:playbin0/GstQueue:preroll_video_src0.GstPad:src: caps = NULL
/GstPlayBin:playbin0/GstQueue:preroll_video_src0.GstPad:sink: caps = NULL
/GstPlayBin:playbin0/GstStreamSelector:selector_video_src0.GstPlaybinSelectorPad:sink0: caps = NULL
/GstPlayBin:playbin0/GstStreamSelector:selector_video_src0.GstPad:src: caps = NULL
/GstPlayBin:playbin0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps = NULL
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/Gstajaydec:ajaydec0.GstPad:src: caps = NULL
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/Gstajaydec:ajaydec0.GstPad:sink: caps = NULL
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:src: caps = NULL
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:sink: caps = NULL
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0.GstPad:video_00: caps = NULL
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0.GstPad:sink: caps = NULL
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = NULL
Freeing pipeline ...

Attaching video decoder, video sink source templates. Please LMK what am I missing here.

gstajayvidsink_template.cgstajayh264decoder_template.c

thanks,
ajay


Reply | Threaded
Open this post in threaded view
|

Re: video decoder and video sink plugins not negotiating using playbin

Thiago Santos
On Mon, 2013-08-05 at 00:33 -0700, ajay kumar wrote:

> Hi,
>
> I'm beginner to gstreamer, and am developing a customized h264 video decoder
> and video sink plugins. These plugins are working with 'gst-launch-0.10'
>
> gst-launch-0.10 filesrc location=/multimedia_samples/sample_onlyvideo.mp4 !
> qtdemux name=demux demux.video_00 ! ajayh264dec ! ajayvidsink
>
> But with 'playbin', the elements are not negotiating.
>
>  gst-launch playbin video-sink='ajayvidsink'
> uri=file:///multimedia_samples/sam
> ple_onlyvideo.mp4 -v
>
> Below is the 'log' received for above play bin command.
>
> Setting pipeline to PAUSED ...
> /GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
> caps = video/quicktime, variant=(string)iso
> Pipeline is PREROLLING ...
> /GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0.GstPad:sink:
> caps = video/quicktime, variant=(string)iso
> /GstPlayBin:playbin0/GstStreamSelector:selector_video_src0: active-pad =
> NULL
>
>
> Ajayvidsink:start/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:sink:
> caps = video/x-h264, stream-format=(string)avc, alignment=(string0
> /GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:src:
> caps = video/x-h264, stream-format=(string)avc, alignment=(string)au,
> level=(string)0
>
> mine: pad = sinkpad
> /GstPlayBin:playbin0/GstDecodeBin:decodebin0/Gstajaydec:ajaydec0.GstPad:sink:
> caps = video/x-h264, stream-format=(string)avc, alignment=(string)au,
> level=(st0
>
> ajaydec: decoding
> h264/GstPlayBin:playbin0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps =
> video/x-h264, stream-format=(string)avc, alignment=(string)au, le0
> /GstPlayBin:playbin0/GstDecodeBin:decodebin0/Gstajaydec:ajaydec0.GstPad:src:
> caps = video/x-h264, stream-format=(string)avc, alignment=(string)au,
> level=(str0
> /GstPlayBin:playbin0/GstStreamSelector:selector_video_src0.GstPlaybinSelectorPad:sink0:
> caps = video/x-h264, stream-format=(string)avc, alignment=(string)au,0
> /GstPlayBin:playbin0/GstDecodeBin:decodebin0.GstGhostPad:src0.GstProxyPad:proxypad2:
> caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, le0
> /GstPlayBin:playbin0/GstStreamSelector:selector_video_src0.GstPad:src: caps
> = video/x-h264, stream-format=(string)avc, alignment=(string)au,
> level=(string)3.0
> /GstPlayBin:playbin0/GstQueue:preroll_video_src0.GstPad:sink: caps =
> video/x-h264, stream-format=(string)avc, alignment=(string)au,
> level=(string)3.1, profil0
>
> ajaydec: decoding h264
> ajaydec: decoding h264
> ajaydec: decoding h264
> ajaydec: decoding h264
> ajaydec: decoding
> h264/GstPlayBin:playbin0/GstQueue:preroll_video_src0.GstPad:src: caps =
> video/x-h264, stream-format=(string)avc, alignment=(string)au, leve0
>
> ajaydec: decoding h264
> ajaydec: decoding h264ERROR: from element
> /GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0: GStreamer
> encountered a general stream error.
> Additional debug info:
> qtdemux.c(3865): gst_qtdemux_loop ():
> /GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0:
> streaming stopped, reason not-negotiated
> ERROR: pipeline doesn't want to preroll.
> Setting pipeline to NULL ...
>
> Ajayvidsink:stop/GstPlayBin:playbin0/GstQueue:preroll_video_src0.GstPad:src:
> caps = NULL
> /GstPlayBin:playbin0/GstQueue:preroll_video_src0.GstPad:sink: caps = NULL
> /GstPlayBin:playbin0/GstStreamSelector:selector_video_src0.GstPlaybinSelectorPad:sink0:
> caps = NULL
> /GstPlayBin:playbin0/GstStreamSelector:selector_video_src0.GstPad:src: caps
> = NULL
> /GstPlayBin:playbin0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps = NULL
> /GstPlayBin:playbin0/GstDecodeBin:decodebin0/Gstajaydec:ajaydec0.GstPad:src:
> caps = NULL
> /GstPlayBin:playbin0/GstDecodeBin:decodebin0/Gstajaydec:ajaydec0.GstPad:sink:
> caps = NULL
> /GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:src:
> caps = NULL
> /GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:sink:
> caps = NULL
> /GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0.GstPad:video_00:
> caps = NULL
> /GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0.GstPad:sink:
> caps = NULL
> /GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
> caps = NULL
> Freeing pipeline ...
>
> Attaching video decoder, video sink source templates. Please LMK what am I
> missing here.

Hi,

please use playbin2, playbin is deprecated in 0.10.

It seems your sink has ANY caps in its template, this is likely not
true. You should specify the formats that it supports to make sure that
converters can act if needed.

Also, it seems that you have posted some very incomplete element code.
Either you didn't implement or you omitted too much it is hard to help
debugging.

From the code I can see, you are pushing the h264 buffers on your
decoder as you receive, meaning that you aren't really decoding them and
also they are carrying on the same caps of the input. This means that
your h264 decoder takes h264 on input and produces h264 on its output
where downstream elements are likely expecting some sort of raw video.

--
Thiago

>
> gstajayvidsink_template.c
> <http://gstreamer-devel.966125.n4.nabble.com/file/n4661420/gstajayvidsink_template.c>  
> gstajayh264decoder_template.c
> <http://gstreamer-devel.966125.n4.nabble.com/file/n4661420/gstajayh264decoder_template.c>  
>
> thanks,
> ajay
>
>
>
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/video-decoder-and-video-sink-plugins-not-negotiating-using-playbin-tp4661420.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: video decoder and video sink plugins not negotiating using playbin

ajay kumar
Thanks a lot Thiago for the reply. You pointed it out correctly that, I did not change the output buffer caps. Actually, I have to use a hardware h264 decoder core to decode the input stream. I would be reading the output 'raw' data to a new gst buffer and push it to the src pad. Attached code was the initial gstreamer wrapper for the same before implementing the hardware stuff.

thanks once again,
ajay