Skip to content

proxysink: event_function needs to handle the event when it is disconnecetd from proxysrc

Jose Quaresma requested to merge quaresma.jose/gst-plugins-bad:proxysink into master

without this a disconneted proxysink fail when goes to play with error:

 Internal data stream error.
 streaming stopped, reason error (-5)

master

gst-launch-1.0 --gst-debug=proxysink:7 fakesrc num-buffers=1 ! proxysink

0:00:00.006326984 224858 0x5613dd169780 LOG                proxysink gstproxysink.c:163:gst_proxy_sink_sink_query:<proxysink0:sink> Handling query of type 'caps'
0:00:00.006397789 224858 0x5613dd169780 LOG                proxysink gstproxysink.c:163:gst_proxy_sink_sink_query:<proxysink0:sink> Handling query of type 'caps'
Setting pipeline to PAUSED ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
0:00:00.006769075 224858 0x5613dd139b60 LOG                proxysink gstproxysink.c:204:gst_proxy_sink_sink_event:<proxysink0:sink> Got stream-start event
0:00:00.006790214 224858 0x5613dd139b60 LOG                proxysink gstproxysink.c:204:gst_proxy_sink_sink_event:<proxysink0:sink> Got stream-start event
0:00:00.006853409 224858 0x5613dd139b60 LOG                proxysink gstproxysink.c:204:gst_proxy_sink_sink_event:<proxysink0:sink> Got stream-start event
0:00:00.006860262 224858 0x5613dd139b60 LOG                proxysink gstproxysink.c:204:gst_proxy_sink_sink_event:<proxysink0:sink> Got stream-start event
ERROR: from element /GstPipeline:pipeline0/GstFakeSrc:fakesrc0: Internal data stream error.
Additional debug info:
../subprojects/gstreamer/libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstFakeSrc:fakesrc0:
streaming stopped, reason error (-5)
New clock: GstSystemClock
0:00:00.006941514 224858 0x5613dd139b60 LOG                proxysink gstproxysink.c:204:gst_proxy_sink_sink_event:<proxysink0:sink> Got stream-start event
Execution ended after 0:00:00.000176052
0:00:00.006947767 224858 0x5613dd139b60 LOG                proxysink gstproxysink.c:204:gst_proxy_sink_sink_event:<proxysink0:sink> Got stream-start event
Setting pipeline to NULL ...
0:00:00.006954912 224858 0x5613dd139b60 LOG                proxysink gstproxysink.c:204:gst_proxy_sink_sink_event:<proxysink0:sink> Got stream-start event
0:00:00.006960221 224858 0x5613dd139b60 LOG                proxysink gstproxysink.c:204:gst_proxy_sink_sink_event:<proxysink0:sink> Got eos event
Freeing pipeline ...

this patch

gst-launch-1.0 --gst-debug=proxysink:7 fakesrc num-buffers=1 ! proxysink

0:00:00.008593827 224963 0x55a4f8bb6780 LOG                proxysink gstproxysink.c:163:gst_proxy_sink_sink_query:<proxysink0:sink> Handling query of type 'caps'
0:00:00.008627340 224963 0x55a4f8bb6780 LOG                proxysink gstproxysink.c:163:gst_proxy_sink_sink_query:<proxysink0:sink> Handling query of type 'caps'
Setting pipeline to PAUSED ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
0:00:00.008926114 224963 0x55a4f8b86b60 LOG                proxysink gstproxysink.c:204:gst_proxy_sink_sink_event:<proxysink0:sink> Got stream-start event
0:00:00.008949890 224963 0x55a4f8b86b60 LOG                proxysink gstproxysink.c:163:gst_proxy_sink_sink_query:<proxysink0:sink> Handling query of type 'allocation'
0:00:00.008982943 224963 0x55a4f8b86b60 LOG                proxysink gstproxysink.c:204:gst_proxy_sink_sink_event:<proxysink0:sink> Got segment event
0:00:00.008991481 224963 0x55a4f8b86b60 LOG                proxysink gstproxysink.c:242:gst_proxy_sink_sink_chain:<proxysink0:sink> Chaining buffer 0x55a4f8bfd5a0
New clock: GstSystemClock
0:00:00.009000716 224963 0x55a4f8b86b60 LOG                proxysink gstproxysink.c:264:gst_proxy_sink_sink_chain:<proxysink0:sink> Dropped buffer 0x55a4f8bfd5a0: no otherpad
0:00:00.009010321 224963 0x55a4f8b86b60 LOG                proxysink gstproxysink.c:204:gst_proxy_sink_sink_event:<proxysink0:sink> Got eos event

This patch need to be backported to 1.16

Merge request reports

Loading