mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-03 18:31:28 +00:00
analytics: objectdetectionoverlay: improve event handling
This change ensures that the `GST_EVENT_EOS`, `GST_EVENT_FLUSH_START` and `GST_EVENT_FLUSH_STOP` events are forwarded to the sink downstream. The logging message for `GST_EVENT_FLUSH_START` has also been fixed. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8576>
This commit is contained in:
parent
356c1ff8e3
commit
51a3ef55c9
1 changed files with 4 additions and 1 deletions
|
@ -554,12 +554,14 @@ gst_object_detection_overlay_sink_event (GstBaseTransform * trans,
|
||||||
GST_INFO_OBJECT (overlay, "EOS");
|
GST_INFO_OBJECT (overlay, "EOS");
|
||||||
overlay->eos = TRUE;
|
overlay->eos = TRUE;
|
||||||
g_mutex_unlock (&overlay->stream_event_mutex);
|
g_mutex_unlock (&overlay->stream_event_mutex);
|
||||||
|
ret = GST_BASE_TRANSFORM_CLASS (parent_class)->sink_event (trans, event);
|
||||||
break;
|
break;
|
||||||
case GST_EVENT_FLUSH_START:
|
case GST_EVENT_FLUSH_START:
|
||||||
g_mutex_lock (&overlay->stream_event_mutex);
|
g_mutex_lock (&overlay->stream_event_mutex);
|
||||||
GST_INFO_OBJECT (overlay, "Flush stop");
|
GST_INFO_OBJECT (overlay, "Flush start");
|
||||||
overlay->flushing = TRUE;
|
overlay->flushing = TRUE;
|
||||||
g_mutex_unlock (&overlay->stream_event_mutex);
|
g_mutex_unlock (&overlay->stream_event_mutex);
|
||||||
|
ret = GST_BASE_TRANSFORM_CLASS (parent_class)->sink_event (trans, event);
|
||||||
break;
|
break;
|
||||||
case GST_EVENT_FLUSH_STOP:
|
case GST_EVENT_FLUSH_STOP:
|
||||||
g_mutex_lock (&overlay->stream_event_mutex);
|
g_mutex_lock (&overlay->stream_event_mutex);
|
||||||
|
@ -567,6 +569,7 @@ gst_object_detection_overlay_sink_event (GstBaseTransform * trans,
|
||||||
overlay->eos = FALSE;
|
overlay->eos = FALSE;
|
||||||
overlay->flushing = FALSE;
|
overlay->flushing = FALSE;
|
||||||
g_mutex_unlock (&overlay->stream_event_mutex);
|
g_mutex_unlock (&overlay->stream_event_mutex);
|
||||||
|
ret = GST_BASE_TRANSFORM_CLASS (parent_class)->sink_event (trans, event);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ret = GST_BASE_TRANSFORM_CLASS (parent_class)->sink_event (trans, event);
|
ret = GST_BASE_TRANSFORM_CLASS (parent_class)->sink_event (trans, event);
|
||||||
|
|
Loading…
Reference in a new issue