Why is the flag `GST_PAD_FLAG_EOS` set for element `v4l2src`, when the pipeline is modified dynamically?
Antonio Ospite
ao2 at ao2.it
Fri Aug 31 10:58:06 UTC 2018
On Thu, 30 Aug 2018 11:19:49 -0500 (CDT)
vk_gst <venkateshkuppan26 at gmail.com> wrote:
>
> Hello Antonio,
>
> 1. Since the pipeline has to many elements and the script is too huge, I
> made 2 versions of the test, and again there are different behaviour. The
> first pipeline is same as mentioned earlier with a slight modification:
>
> v4l2src -> queue -> h264parse -> avdec_h264 -> identity ->
> imagefreeze(added/removed dynamically based on user-input) -> glupload ->
> glcolorconvert ->gltransformation -> glimagesink
>
Your examples did not work here (I suspect it is my ancient GPU
which does not like the gl elements), so I tried to clean up and
simplify the example into a software version:
videotestsrc pattern=18 background-color=4294901760 ! \
video/x-raw,width=320,height=240 ! \
identity name=identity ! \
imagefreeze(added/removed dynamically based on user-input)
videoconvert name=conv ! \
rotate name=rotate ! \
videoconvert ! \
autovideosink
I used pattern=18 to spot discontinuities a little more clearly.
And I am animating the rotate.angle property to simulate your
gltransformation effect, see the attachment (I hope the list allows it).
I am able to observe the behavior you are describing: the pipeline
stalls after removing imagefreeze.
By logging what happens at the pad level (GST_DEBUG=GST_PADS:6), I
spotted a GST_QOS_TYPE_OVERFLOW event which refers to the sink.
So what may be happening here is that imagefreeze messes up some
state, and after its removal the parts of the pipeline which were
upstream and downstream to imagefreeze are not able to talk to each
other anymore, and so the pipieline stalls (including the
rotate/gltransformation element).
If you play with the pipeline state (see the XXX comments in the
example) you can kinda make it work for live sources, but this is not a
solution.
I'll try if decoupling the pipeline helps.
I am pasting below the interesting part of the GST_PADS log.
Ciao,
Antonio
unfreeze
unlinking identity srcpad - imagefreeze sinkpad
True
unlinking imagefreeze srcpad - videoconvert sinkpad
True
0:00:08.509048658 12697 0x21dac40 DEBUG GST_PADS gstpad.c:6265:gst_pad_stop_task:<imagefreeze:src> stop task
0:00:08.538988529 12697 0x1f950a0 LOG GST_PADS gstpad.c:5392:gst_pad_push_event_unchecked:<autovideosink0-actual-sink-xvimage:sink> sending event 0x7fcbf8004990 (qos) to peerpad <sink:proxypad0>
0:00:08.539087247 12697 0x1f950a0 LOG GST_PADS gstpad.c:3087:gst_pad_event_default:<sink:proxypad0> default event handler for event qos event: 0x7fcbf8004990, time 99:99:99.999999999, seq-num 776, GstEventQOS, type=(GstQOSType)GST_QOS_TYPE_OVERFLOW, proportion=(double)0.37616981894395174, diff=(gint64)-36050697, timestamp=(guint64)8440000000;
0:00:08.539120367 12697 0x1f950a0 LOG GST_PADS gstpad.c:3007:gst_pad_forward:<sink:proxypad0> calling forward function on pad autovideosink0:sink
0:00:08.539142806 12697 0x1f950a0 LOG GST_PADS gstpad.c:3052:event_forward_func:<autovideosink0:sink> Reffing and pushing event 0x7fcbf8004990 (qos) to autovideosink0:sink
0:00:08.539165126 12697 0x1f950a0 LOG GST_PADS gstpad.c:5392:gst_pad_push_event_unchecked:<autovideosink0:sink> sending event 0x7fcbf8004990 (qos) to peerpad <videoconvert1:src>
0:00:08.539191365 12697 0x1f950a0 LOG GST_PADS gstpad.c:5392:gst_pad_push_event_unchecked:<videoconvert1:sink> sending event 0x7fcbf8004990 (qos) to peerpad <rotate:src>
0:00:08.539214645 12697 0x1f950a0 LOG GST_PADS gstpad.c:5392:gst_pad_push_event_unchecked:<rotate:sink> sending event 0x7fcbf8004990 (qos) to peerpad <conv:src>
0:00:08.539235005 12697 0x1f950a0 DEBUG GST_PADS gstpad.c:5448:gst_pad_push_event_unchecked:<conv:sink> Dropping event qos because pad is not linked
0:00:08.539254084 12697 0x1f950a0 DEBUG GST_PADS gstpad.c:5753:gst_pad_send_event_unchecked:<conv:src> sent event, ret error
0:00:08.539285324 12697 0x1f950a0 LOG GST_PADS gstpad.c:5400:gst_pad_push_event_unchecked:<rotate:sink> sent event 0x7fcbf8004990 (qos) to peerpad <conv:src>, ret error
0:00:08.539303843 12697 0x1f950a0 DEBUG GST_PADS gstpad.c:5753:gst_pad_send_event_unchecked:<rotate:src> sent event, ret error
0:00:08.539325243 12697 0x1f950a0 LOG GST_PADS gstpad.c:5400:gst_pad_push_event_unchecked:<videoconvert1:sink> sent event 0x7fcbf8004990 (qos) to peerpad <rotate:src>, ret error
0:00:08.539343362 12697 0x1f950a0 DEBUG GST_PADS gstpad.c:5753:gst_pad_send_event_unchecked:<videoconvert1:src> sent event, ret error
0:00:08.539364482 12697 0x1f950a0 LOG GST_PADS gstpad.c:5400:gst_pad_push_event_unchecked:<autovideosink0:sink> sent event 0x7fcbf8004990 (qos) to peerpad <videoconvert1:src>, ret error
0:00:08.539386402 12697 0x1f950a0 DEBUG GST_PADS gstpad.c:5753:gst_pad_send_event_unchecked:<sink:proxypad0> sent event, ret error
0:00:08.539407801 12697 0x1f950a0 LOG GST_PADS gstpad.c:5400:gst_pad_push_event_unchecked:<autovideosink0-actual-sink-xvimage:sink> sent event 0x7fcbf8004990 (qos) to peerpad <sink:proxypad0>, ret error
0:00:08.539442641 12697 0x1f950a0 DEBUG GST_PADS gstpad.c:6048:do_stream_status:<imagefreeze:src> doing stream-status 2
0:00:08.539470440 12697 0x1f950a0 DEBUG GST_PADS gstpad.c:6077:do_stream_status:<imagefreeze:src> posting stream-status 2
0:00:08.539556558 12697 0x21dac40 DEBUG GST_PADS gstpad.c:1121:gst_pad_set_active:<imagefreeze:src> deactivating pad from push mode
0:00:08.539592478 12697 0x21dac40 DEBUG GST_PADS gstpad.c:991:pre_activate:<imagefreeze:src> setting PAD_MODE NONE, set flushing
0:00:08.539607237 12697 0x21dac40 DEBUG GST_PADS gstpad.c:1054:post_activate:<imagefreeze:src> stopped streaming
0:00:08.539620117 12697 0x21dac40 DEBUG GST_PADS gstpad.c:462:remove_events:<imagefreeze:src> notify caps
0:00:08.539642237 12697 0x21dac40 DEBUG GST_PADS gstpad.c:1235:activate_mode_internal:<imagefreeze:src> deactivated in push mode
0:00:08.539659836 12697 0x21dac40 DEBUG GST_PADS gstpad.c:1121:gst_pad_set_active:<imagefreeze:sink> deactivating pad from push mode
0:00:08.539671716 12697 0x21dac40 DEBUG GST_PADS gstpad.c:991:pre_activate:<imagefreeze:sink> setting PAD_MODE NONE, set flushing
0:00:08.539683716 12697 0x21dac40 DEBUG GST_PADS gstpad.c:1054:post_activate:<imagefreeze:sink> stopped streaming
0:00:08.539694956 12697 0x21dac40 DEBUG GST_PADS gstpad.c:462:remove_events:<imagefreeze:sink> notify caps
0:00:08.539710276 12697 0x21dac40 DEBUG GST_PADS gstpad.c:1235:activate_mode_internal:<imagefreeze:sink> deactivated in push mode
0:00:08.539735195 12697 0x21dac40 DEBUG GST_PADS gstpad.c:1117:gst_pad_set_active:<imagefreeze:src> pad was inactive
0:00:08.539748835 12697 0x21dac40 DEBUG GST_PADS gstpad.c:1117:gst_pad_set_active:<imagefreeze:sink> pad was inactive
linking identity srcpad - videoconvert sinkpad
0:00:08.539882472 12697 0x21dac40 INFO GST_PADS gstpad.c:2378:gst_pad_link_prepare: trying to link identity:src and conv:sink
0:00:08.539904552 12697 0x21dac40 DEBUG GST_PADS gstpad.c:4047:gst_pad_query:<identity:src> doing query 0x1fb9800 (caps)
0:00:08.539920032 12697 0x21dac40 DEBUG GST_PADS gstpad.c:3808:do_probe_callbacks:<identity:src> data is passed
0:00:08.539941791 12697 0x21dac40 DEBUG GST_PADS gstpad.c:4174:gst_pad_peer_query:<identity:sink> peer query 0x1fb9850 (caps)
0:00:08.539956591 12697 0x21dac40 DEBUG GST_PADS gstpad.c:4047:gst_pad_query:<capsfilter0:src> doing query 0x1fb9850 (caps)
0:00:08.539972751 12697 0x21dac40 DEBUG GST_PADS gstpad.c:4174:gst_pad_peer_query:<capsfilter0:sink> peer query 0x1fb98a0 (caps)
0:00:08.539987470 12697 0x21dac40 DEBUG GST_PADS gstpad.c:4047:gst_pad_query:<v4l2src0:src> doing query 0x1fb98a0 (caps)
0:00:08.540008070 12697 0x21dac40 DEBUG GST_PADS gstpad.c:4070:gst_pad_query:<v4l2src0:src> sent query 0x1fb98a0 (caps), result 1
0:00:08.540047309 12697 0x21dac40 DEBUG GST_PADS gstpad.c:4070:gst_pad_query:<capsfilter0:src> sent query 0x1fb9850 (caps), result 1
0:00:08.540078429 12697 0x21dac40 DEBUG GST_PADS gstpad.c:4070:gst_pad_query:<identity:src> sent query 0x1fb9800 (caps), result 1
0:00:08.540096388 12697 0x21dac40 DEBUG GST_PADS gstpad.c:4047:gst_pad_query:<conv:sink> doing query 0x1fb9990 (caps)
0:00:08.540113268 12697 0x21dac40 DEBUG GST_PADS gstpad.c:4174:gst_pad_peer_query:<conv:src> peer query 0x1fb99e0 (caps)
0:00:08.540127348 12697 0x21dac40 DEBUG GST_PADS gstpad.c:4047:gst_pad_query:<rotate:sink> doing query 0x1fb99e0 (caps)
0:00:08.540143787 12697 0x21dac40 DEBUG GST_PADS gstpad.c:4174:gst_pad_peer_query:<rotate:src> peer query 0x1fb9a30 (caps)
0:00:08.540157987 12697 0x21dac40 DEBUG GST_PADS gstpad.c:4047:gst_pad_query:<videoconvert1:sink> doing query 0x1fb9a30 (caps)
0:00:08.540174547 12697 0x21dac40 DEBUG GST_PADS gstpad.c:4174:gst_pad_peer_query:<videoconvert1:src> peer query 0x1fb9800 (caps)
0:00:08.540189586 12697 0x21dac40 DEBUG GST_PADS gstpad.c:4047:gst_pad_query:<autovideosink0:sink> doing query 0x1fb9800 (caps)
0:00:08.540205146 12697 0x21dac40 DEBUG GST_PADS gstutils.c:2801:gst_pad_proxy_query_caps:<autovideosink0:sink> proxying caps query for autovideosink0:sink
0:00:08.540224026 12697 0x21dac40 LOG GST_PADS gstpad.c:3007:gst_pad_forward:<autovideosink0:sink> calling forward function on pad sink:proxypad0
0:00:08.540238705 12697 0x21dac40 DEBUG GST_PADS gstpad.c:4174:gst_pad_peer_query:<sink:proxypad0> peer query 0x1fb9800 (caps)
0:00:08.540253145 12697 0x21dac40 DEBUG GST_PADS gstpad.c:4047:gst_pad_query:<autovideosink0-actual-sink-xvimage:sink> doing query 0x1fb9800 (caps)
0:00:08.540271145 12697 0x21dac40 DEBUG GST_PADS gstpad.c:4070:gst_pad_query:<autovideosink0-actual-sink-xvimage:sink> sent query 0x1fb9800 (caps), result 1
0:00:08.540290105 12697 0x21dac40 DEBUG GST_PADS gstpad.c:3438:gst_pad_query_default:<autovideosink0:sink> not forwarding 0x1fb9800 (caps) query
0:00:08.540305584 12697 0x21dac40 DEBUG GST_PADS gstpad.c:4070:gst_pad_query:<autovideosink0:sink> sent query 0x1fb9800 (caps), result 1
0:00:08.540580099 12697 0x21dac40 DEBUG GST_PADS gstpad.c:4070:gst_pad_query:<videoconvert1:sink> sent query 0x1fb9a30 (caps), result 1
0:00:08.540932172 12697 0x21dac40 DEBUG GST_PADS gstpad.c:4070:gst_pad_query:<rotate:sink> sent query 0x1fb99e0 (caps), result 1
0:00:08.541414683 12697 0x21dac40 DEBUG GST_PADS gstpad.c:4070:gst_pad_query:<conv:sink> sent query 0x1fb9990 (caps), result 1
0:00:08.541449802 12697 0x21dac40 INFO GST_PADS gstpad.c:2586:gst_pad_link_full: linked identity:src and conv:sink, successful
0:00:08.541465042 12697 0x21dac40 DEBUG GST_PADS gstpad.c:3808:do_probe_callbacks:<identity:src> data is passed
0:00:08.541484322 12697 0x21dac40 LOG GST_PADS gstpad.c:5392:gst_pad_push_event_unchecked:<identity:sink> sending event 0x7fcbf8005310 (reconfigure) to peerpad <capsfilter0:src>
0:00:08.541502241 12697 0x21dac40 LOG GST_PADS gstpad.c:5392:gst_pad_push_event_unchecked:<capsfilter0:sink> sending event 0x7fcbf8005310 (reconfigure) to peerpad <v4l2src0:src>
0:00:08.541518321 12697 0x21dac40 DEBUG GST_PADS gstpad.c:5753:gst_pad_send_event_unchecked:<v4l2src0:src> sent event, ret ok
0:00:08.541535841 12697 0x21dac40 LOG GST_PADS gstpad.c:5400:gst_pad_push_event_unchecked:<capsfilter0:sink> sent event 0x7fcbf8005310 (reconfigure) to peerpad <v4l2src0:src>, ret ok
0:00:08.541549961 12697 0x21dac40 DEBUG GST_PADS gstpad.c:5753:gst_pad_send_event_unchecked:<capsfilter0:src> sent event, ret ok
0:00:08.541566720 12697 0x21dac40 LOG GST_PADS gstpad.c:5400:gst_pad_push_event_unchecked:<identity:sink> sent event 0x7fcbf8005310 (reconfigure) to peerpad <capsfilter0:src>, ret ok
0:00:08.541580680 12697 0x21dac40 DEBUG GST_PADS gstpad.c:5753:gst_pad_send_event_unchecked:<identity:src> sent event, ret ok
<enum GST_PAD_LINK_OK of type Gst.PadLinkReturn>
0:00:08.541682758 12697 0x21dac40 DEBUG GST_PADS gstpad.c:1511:gst_pad_add_probe:<identity:src> asked to remove hook
0:00:08.541698838 12697 0x21dac40 DEBUG GST_PADS gstpad.c:1388:cleanup_hook:<identity:src> remove blocking probe, now 0 left
0:00:08.541712637 12697 0x21dac40 DEBUG GST_PADS gstpad.c:1394:cleanup_hook:<identity:src> last blocking probe removed, unblocking
--
Antonio Ospite
https://ao2.it
https://twitter.com/ao2it
A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gst-dynamic-pipeline-imagefreeze.py
Type: text/x-python
Size: 5892 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180831/266eafb6/attachment-0001.py>
More information about the gstreamer-devel
mailing list