get mouse navigation events on application level ?

Andoni Morales ylatuya at gmail.com
Thu Aug 15 10:51:07 PDT 2013


2013/8/14 Tim-Philipp Müller <t.i.m at zen.co.uk>

> On Wed, 2013-08-14 at 16:41 +0200, adrian at tortenboxer.de wrote:
>
> Hi,
>
> > In my application the stream from a live camera (appsrc) is displayed
> > in a GTK drawarea (autovideosink+gst_video_overlay_set_window_handle).
> > I would like to be able to interactively draw rectangular selections on
> > the video. For the drawing I can use a cairooverlay element, but it is
> > not clear to me how to subscribe to mouse navigation events.
> >
> > That is, using GTK (motion-notify-events of the drawing_area etc.) I
> > can get the widget-relative pointer coordinates, but then I have to
> > calculate the frame-relative coordinates myself (which might be
> > inaccurate, considering I force the aspect ratio so that the video
> > overlay is possibly much smaller than the drawing area widget itself).
> > I can see how the navigationtest element does the job, looking at its
> > source code, but I am under the impression that I would have to
> > implement a gstreamer element in order to subscribe to these upstream
> > propagating events. Am I wrong ? In any case the application developer
> > manual does not explain how to connect to these events. Is there
> > another element which exposes the "mouse-move" etc. events ?
>
> Well, it's quite an obscure feature, mostly used for things like DVD
> menu navigation :)
>

> But you're right in that you have to write your own element in order to
> pick up these events.
>
>
> http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/gst-libs/gst/video/navigation.h
>
> has a few helper functions (which don't seem to be appear in the docs it
> seems, something to fix).
>

The navigationtest element is a good example showing how to handle this
events and draw the mouse movement and clicks.

Cheers,
Andoni

>
> Cheers
>  -Tim
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>



-- 
Andoni Morales Alastruey

LongoMatch:The Digital Coach
http://www.longomatch.ylatuya.es
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130815/0e271dcd/attachment-0001.html>


More information about the gstreamer-devel mailing list