Skip to content

fakesinks: Fix recursive notify loop

The proxy callback for the notify::last-message was emiting the signal again on the child, which caused an infinit loop. We could swap the child and the user data to signal to the bin instead, but it was found that proxying this signal was not very useful. Typical use case it to set silent=0 and use deep-notify feature. Proxying that signal just duplicate that output which isn't very useful. It would have looked like:

gst-launch-1.0 videotestsrc num-buffers=1 ! fakevideosink silent=0 -v
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstFakeVideoSink:fakevideosink0: last-message = event   ******* (sink:sink) E (type: stream-start (10254), GstEventStreamStart, stream-id=(string)66f8de21caeef63c1de43d29b53573fa, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)1;) 0x7ff434001a70
/GstPipeline:pipeline0/GstFakeVideoSink:fakevideosink0/GstFakeSink:sink: last-message = event   ******* (sink:sink) E (type: stream-start (10254), GstEventStreamStart, stream-id=(string)66f8de21caeef63c1de43d29b53573fa, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)1;) 0x7ff434001a70
...

So we just drop that signal proxy, which brings us back to the original state, before the proxy re-factoring.

Edited by Nicolas Dufresne

Merge request reports