mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
gst: sink: Remove unused posting of navigation messages
We only need to post events in the pipeline for navigation to work. This was never used for anything and it generates a lot of noise in the pipeline bus when cursor is moving over video.
This commit is contained in:
@@ -411,24 +411,18 @@ gst_clapper_sink_navigation_send_event (GstNavigation *navigation,
|
|||||||
{
|
{
|
||||||
GstClapperSink *sink = GST_CLAPPER_SINK_CAST (navigation);
|
GstClapperSink *sink = GST_CLAPPER_SINK_CAST (navigation);
|
||||||
GstEvent *event;
|
GstEvent *event;
|
||||||
|
|
||||||
GST_TRACE_OBJECT (sink, "Navigation event: %" GST_PTR_FORMAT, structure);
|
|
||||||
event = gst_event_new_navigation (structure);
|
|
||||||
|
|
||||||
if (G_LIKELY (event)) {
|
|
||||||
GstPad *pad;
|
GstPad *pad;
|
||||||
|
|
||||||
|
GST_TRACE_OBJECT (sink, "Navigation event: %" GST_PTR_FORMAT, structure);
|
||||||
|
event = gst_event_new_navigation (structure); // transfer full
|
||||||
pad = gst_pad_get_peer (GST_VIDEO_SINK_PAD (sink));
|
pad = gst_pad_get_peer (GST_VIDEO_SINK_PAD (sink));
|
||||||
|
|
||||||
if (G_LIKELY (pad)) {
|
if (G_LIKELY (pad != NULL)) {
|
||||||
if (!gst_pad_send_event (pad, gst_event_ref (event))) {
|
if (!gst_pad_send_event (pad, event)) // transfer full
|
||||||
/* If upstream didn't handle the event we'll post a message with it
|
GST_LOG_OBJECT (sink, "Upstream did not handle navigation event");
|
||||||
* for the application in case it wants to do something with it */
|
|
||||||
gst_element_post_message (GST_ELEMENT_CAST (sink),
|
|
||||||
gst_navigation_message_new_event (GST_OBJECT_CAST (sink), event));
|
|
||||||
}
|
|
||||||
gst_object_unref (pad);
|
gst_object_unref (pad);
|
||||||
}
|
} else {
|
||||||
gst_event_unref (event);
|
gst_event_unref (event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user