From eac9f606080ad39f6a81954984061af54c5ff066 Mon Sep 17 00:00:00 2001 From: Michael Tretter Date: Wed, 19 Jul 2023 10:38:40 +0200 Subject: [PATCH] uvcsink: extract common code in idle_probe The RECONFIGURE event has to be sent in streamon and streamoff. Extract the common code to a separate branch to make it easier to understand. Part-of: --- subprojects/gst-plugins-bad/sys/uvcgadget/gstuvcsink.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/uvcgadget/gstuvcsink.c b/subprojects/gst-plugins-bad/sys/uvcgadget/gstuvcsink.c index 525addb83c..9625289eae 100644 --- a/subprojects/gst-plugins-bad/sys/uvcgadget/gstuvcsink.c +++ b/subprojects/gst-plugins-bad/sys/uvcgadget/gstuvcsink.c @@ -407,16 +407,14 @@ static GstPadProbeReturn gst_uvc_sink_sinkpad_idle_probe (GstPad * pad, GstPadProbeInfo * info, GstUvcSink * self) { - if (self->streamon) { + if (self->streamon || self->streamoff) { gst_uvc_sink_create_buffer_peer_probe (self); + GST_DEBUG_OBJECT (self, "Send reconfigure"); gst_pad_push_event (self->sinkpad, gst_event_new_reconfigure ()); } - if (self->streamoff) { - gst_uvc_sink_create_buffer_peer_probe (self); - gst_pad_push_event (self->sinkpad, gst_event_new_reconfigure ()); + if (self->streamoff) gst_uvc_sink_to_fakesink (self); - } return GST_PAD_PROBE_PASS; }