GNOME Bugzilla – Bug 763403
bad: video sink: Post un-handled keyboard/mouse events as message to application
Last modified: 2016-03-26 20:21:30 UTC
Few videosinks are not posting unhandled events to application. Handling the same in this bug.
Created attachment 323558 [details] [review] gtkbasesink: Post unhandled events
Created attachment 323559 [details] [review] dfbvideosink: Post unhandled events
Created attachment 323560 [details] [review] d3dbvideosink: Post unhandled events
commit 66bac3eb8606ead677bc6bdd7b9f2b34bc5061ad Author: Vineeth TM <vineeth.tm@samsung.com> Date: Thu Mar 10 08:50:28 2016 +0900 d3dvideosink: post message to application for unhandled keyboard/mouse events https://bugzilla.gnome.org/show_bug.cgi?id=763403 commit 1ac501d42706538578c21ed50ba1ae62dcb0fc9b Author: Vineeth TM <vineeth.tm@samsung.com> Date: Thu Mar 10 08:49:01 2016 +0900 dfbvideosink: post message to application for unhandled keyboard/mouse events https://bugzilla.gnome.org/show_bug.cgi?id=763403 commit 9fe6b9b86b1e7e029a9feaf80060d355fd1e9d4d Author: Vineeth TM <vineeth.tm@samsung.com> Date: Thu Mar 10 08:44:57 2016 +0900 gtkbasesink: post message to application for unhandled keyboard/mouse events https://bugzilla.gnome.org/show_bug.cgi?id=763403
Comment on attachment 323558 [details] [review] gtkbasesink: Post unhandled events >- if (GST_IS_PAD (pad)) { >- if (GST_IS_EVENT (event)) >- ... >- >+ if (GST_IS_PAD (pad) && GST_IS_EVENT (event)) { >+ ... >+ gst_event_unref (event); > gst_object_unref (pad); > } > } Just for the record, this is not really equivalent. We would now leak the pad in case where the pad is valid, but the event is not valid. The event will/should always be valid here of course, so will not be a problem in practice.