summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2015-04-02 14:10:32 (GMT)
committerEdward Hervey <bilboed@bilboed.com>2015-04-29 13:47:49 (GMT)
commitc90a3ac468fcb99587b10cd77efae2acfb17d7fa (patch)
treeb1be376023bed0758287d30c38a6051788664b85
parent01e2a2152d8650ef676aa6ea016aa46552cb7023 (diff)
downloadgst-plugins-base-c90a3ac468fcb99587b10cd77efae2acfb17d7fa.tar.gz
gst-plugins-base-c90a3ac468fcb99587b10cd77efae2acfb17d7fa.tar.xz
xvimagesink: Post unhandled navigation events on the bus
https://bugzilla.gnome.org/show_bug.cgi?id=747245
-rw-r--r--sys/xvimage/xvimagesink.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c
index a0d62a0..38f9de8 100644
--- a/sys/xvimage/xvimagesink.c
+++ b/sys/xvimage/xvimagesink.c
@@ -1127,9 +1127,10 @@ gst_xvimagesink_navigation_send_event (GstNavigation * navigation,
{
GstXvImageSink *xvimagesink = GST_XVIMAGESINK (navigation);
GstPad *peer;
+ gboolean handled = FALSE;
+ GstEvent *event = NULL;
if ((peer = gst_pad_get_peer (GST_VIDEO_SINK_PAD (xvimagesink)))) {
- GstEvent *event;
GstVideoRectangle src = { 0, };
GstVideoRectangle dst = { 0, };
GstVideoRectangle result;
@@ -1182,9 +1183,17 @@ gst_xvimagesink_navigation_send_event (GstNavigation * navigation,
(gdouble) y * yscale, NULL);
}
- gst_pad_send_event (peer, event);
+ gst_event_ref (event);
+ handled = gst_pad_send_event (peer, event);
+ if (handled)
+ gst_event_unref (event);
gst_object_unref (peer);
}
+
+ if (!handled && event) {
+ gst_element_post_message ((GstElement *) xvimagesink,
+ gst_navigation_message_new_event ((GstObject *) xvimagesink, event));
+ }
}
static void