Fwd: avdec_h264 can't decide on src caps

Klaas Jan Russcher k.j.russcher at utwente.nl
Wed Oct 21 23:52:05 PDT 2015


Goodmorning,

I have written an pipeline in C++ that gets an GstBuffer via an appsrc and
it is supposed to show a video, but it doesn't. The structure of the
pipeline is:
appsrc ! VIDEO_CAPS ! rtpstreamdepay ! rtpjitterbuffer ! rtph264depay !
h264parse ! queue ! avdec_h264 ! autovideoconvert ! autovideosink
where VIDEO_CAPS is defined by:
"application/x-rtp-stream, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, packetization-mode=(string)1,
profile-level-id=(string)42c01f,
sprop-parameter-sets=(string)\"Z0LAH9oBQBbsBEAAAAMAQAAADyPGDKg\\=\\,aM48gA\\=\\=\",
payload=(int)96"

To analyse the pipeline I have extracted the graph of the pipeline with
gst_debug_bin_to_dot_file(). It shows that avdec_h264 and autovideoconvert
are connected via "video/x-raw format: { I420, YUY2, RGB, B... }" and "ANY"
caps.
When I remove autovideoconvert, the problem remains. When I set the src pad
caps to a specific format, and I read out the current caps of the pad it
returns NULL. Terminal output with GST_DEBUG=4 gives
(data.video_dec=avdec_h264, data.video_convert=autovideoconvert):
0:00:00.026803608 [332m31969 [00m      0x1675800 [36mINFO   [00m
[00;01;31;41m            GST_PADS
gstpad.c:3995:gst_pad_peer_query:<data.video_dec:src> [00m pad has no peer
0:00:00.026872390 [332m31969 [00m      0x1675800 [36mINFO   [00m
[00;01;31;41m            GST_PADS
gstpad.c:3995:gst_pad_peer_query:<data.video_dec:src> [00m pad has no peer
0:00:00.026910994 [332m31969 [00m      0x1675800 [36mINFO   [00m
[00;01;37;41m    GST_ELEMENT_PADS
gstutils.c:1571:gst_element_link_pads_full: [00m trying to link element
data.video_dec:(any) to element data.video_convert: any)
0:00:00.026918387 [332m31969 [00m      0x1675800 [36mINFO   [00m
[00;01;31;41m            GST_PADS gstutils.c:932:gst_pad_check_link: [00m
trying to link data.video_dec:src and data.video_convert:sink
0:00:00.026929181 [332m31969 [00m      0x1675800 [36mINFO   [00m
[00;01;31;41m            GST_PADS
gstpad.c:3995:gst_pad_peer_query:<sink:proxypad0> [00m pad has no peer
0:00:00.026935488 [332m31969 [00m      0x1675800 [36mINFO   [00m
[00;01;31;41m            GST_PADS
gstutils.c:1444:prepare_link_maybe_ghosting: [00m data.video_dec and
data.video_convert in same bin, no need for ghost pads
0:00:00.026943286 [332m31969 [00m      0x1675800 [36mINFO   [00m
[00;01;31;41m            GST_PADS gstpad.c:2234:gst_pad_link_prepare: [00m
trying to link data.video_dec:src and data.video_convert:sink
0:00:00.026952808 [332m31969 [00m      0x1675800 [36mINFO   [00m
[00;01;31;41m            GST_PADS
gstpad.c:3995:gst_pad_peer_query:<sink:proxypad0> [00m pad has no peer
0:00:00.026958722 [332m31969 [00m      0x1675800 [36mINFO   [00m
[00;01;31;41m            GST_PADS gstpad.c:2440:gst_pad_link_full: [00m
linked data.video_dec:src and data.video_convert:sink, successful
0:00:00.026964302 [332m31969 [00m      0x1675800 [36mINFO   [00m [00;01;34m
          GST_EVENT gstevent.c:1374:gst_event_new_reconfigure: [00m
creating reconfigure event
0:00:00.026968753 [332m31969 [00m      0x1675800 [36mINFO   [00m [00;01;34m
          GST_EVENT
gstpad.c:5499:gst_pad_send_event_unchecked:<data.video_dec:src> [00m
Received event on flushing pad. Discarding

My question is, what causes the problem that an element cannot decide on
its caps and how can I solve it?

(The buffers that are put into appsrc (with gst_app_src_push_buffer()) are
extracted from another pipeline:
v4l2src ! queue ! x264enc ! queue ! h264parse ! rtph264pay ! rtpstreampay !
appsink
VIDEO_CAPS of the first pipeline is set to the caps of the sample that is
read from appsink.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20151022/520d48f0/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main_displayer.cpp
Type: text/x-c++src
Size: 1536 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20151022/520d48f0/attachment-0002.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testFiles.zip
Type: application/zip
Size: 225840 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20151022/520d48f0/attachment-0001.zip>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: VideoShow.cpp
Type: text/x-c++src
Size: 3684 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20151022/520d48f0/attachment-0003.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: VideoShow.h
Type: text/x-chdr
Size: 857 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20151022/520d48f0/attachment-0001.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: VideoShow.png
Type: image/png
Size: 208845 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20151022/520d48f0/attachment-0001.png>


More information about the gstreamer-devel mailing list