summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorVineeth T M <vineeth.tm@samsung.com>2015-07-07 19:45:43 +0900
committerLuis de Bethencourt <luis@debethencourt.com>2015-07-07 11:58:45 +0100
commit51019c16e16d1860491840774b2521173440349e (patch)
treefc8463aa51369872dc3cc295e2dd980b1c5378db /sys
parentdb86c73f4d8a876b63acdeaf205b26baffc9aeca (diff)
downloadgstreamer-plugins-base-51019c16e16d1860491840774b2521173440349e.tar.gz
ximagesink: Post navigation events as message on the bus
post unhandled events to bus, so that application can utilise the same if needed https://bugzilla.gnome.org/show_bug.cgi?id=752043
Diffstat (limited to 'sys')
-rw-r--r--sys/ximage/ximagesink.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c
index a0eb5b488..3e6e838bd 100644
--- a/sys/ximage/ximagesink.c
+++ b/sys/ximage/ximagesink.c
@@ -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
@@ -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