diff options
author | Vineeth TM <vineeth.tm@samsung.com> | 2016-03-10 08:49:01 +0900 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-03-25 12:00:22 +0200 |
commit | a42d96cca0b272b22b2c837251d0cbfbbdbcb520 (patch) | |
tree | 8dc09a87548c2fe8a98c42fdd22b2139542f1007 /ext | |
parent | 00d25c44ae151d89883f76db0913a3225747f5b4 (diff) | |
download | gstreamer-plugins-bad-a42d96cca0b272b22b2c837251d0cbfbbdbcb520.tar.gz |
dfbvideosink: post message to application for unhandled keyboard/mouse events
https://bugzilla.gnome.org/show_bug.cgi?id=763403
Diffstat (limited to 'ext')
-rw-r--r-- | ext/directfb/dfbvideosink.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/directfb/dfbvideosink.c b/ext/directfb/dfbvideosink.c index db8ef1732..7ef617f42 100644 --- a/ext/directfb/dfbvideosink.c +++ b/ext/directfb/dfbvideosink.c @@ -2026,8 +2026,14 @@ gst_dfbvideosink_navigation_send_event (GstNavigation * navigation, pad = gst_pad_get_peer (GST_VIDEO_SINK_PAD (dfbvideosink)); if (GST_IS_PAD (pad) && GST_IS_EVENT (event)) { - gst_pad_send_event (pad, event); - + if (!gst_pad_send_event (pad, gst_event_ref (event))) { + /* If upstream didn't handle the event we'll post a message with it + * for the application in case it wants to do something with it */ + gst_element_post_message (GST_ELEMENT_CAST (dfbvideosink), + gst_navigation_message_new_event (GST_OBJECT_CAST (dfbvideosink), + event)); + } + gst_event_unref (event); gst_object_unref (pad); } } |