Skip to content

Commit

Permalink
ximagesink: Post navigation events as message on the bus
Browse files Browse the repository at this point in the history
post unhandled events to bus, so that
application can utilise the same if needed

https://bugzilla.gnome.org/show_bug.cgi?id=752043
  • Loading branch information
Vineeth T M authored and luisbg committed Jul 7, 2015
1 parent db86c73 commit 51019c1
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions sys/ximage/ximagesink.c
Expand Up @@ -1528,6 +1528,7 @@ gst_x_image_sink_navigation_send_event (GstNavigation * navigation,
GstEvent *event = NULL;
gint x_offset, y_offset;
gdouble x, y;
gboolean handled = FALSE;

/* We are not converting the pointer coordinates as there's no hardware
scaling done here. The only possible scaling is done by videoscale and
Expand Down Expand Up @@ -1558,8 +1559,17 @@ gst_x_image_sink_navigation_send_event (GstNavigation * navigation,
}

event = gst_event_new_navigation (structure);
if (event)
gst_pad_push_event (GST_VIDEO_SINK_PAD (ximagesink), event);
if (event) {
gst_event_ref (event);
handled = gst_pad_push_event (GST_VIDEO_SINK_PAD (ximagesink), event);

if (!handled)
gst_element_post_message (GST_ELEMENT_CAST (ximagesink),
gst_navigation_message_new_event (GST_OBJECT_CAST (ximagesink),
event));

gst_event_unref (event);
}
}

static void
Expand Down

0 comments on commit 51019c1

Please sign in to comment.