libvlc - how to catch events

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
JeffM-35
New Cone
New Cone
Posts: 4
Joined: 13 Dec 2007 15:08

libvlc - how to catch events

Postby JeffM-35 » 13 Dec 2007 15:24

I'm building a small application in C++ that uses libvlc to play a 10 second 'intro' video. I've used the http://wiki.videolan.org/LibVLC_Tutorial_086c libvlc C++ code successfully, and can position the video, set the window size, even make it without a border, etc. by passing appropriate arguments.

My question is this - how can I, or where do I go about intercepting user input. In other words, I have a 800x600 video window set up on a 1024x768 screen, no box or border on the video, no user controls, etc. When the user of my little application double clicks on the video window, it becomes full screen. How do I stop that? Ideally, what I want to do is if someone using the c++ application clicks on the video window, I want to exit the video window to close and my application notified that the video has been closed.

I've just started playing with libvlc, and have looked through the forums for a few hours and can't seem to find any relevant posts regarding this.

Any advice much appreciated.

jboileau
Blank Cone
Blank Cone
Posts: 17
Joined: 13 Dec 2005 21:05

Re: libvlc - how to catch events

Postby jboileau » 13 Dec 2007 15:42

Are you using your own window? If not this might be why. Create a Window and tell lbvlc to use it with a call to libvlc_video_set_parent. ex:

libvlc_video_set_parent(LibvlcInstance, (libvlc_drawable_t)HWindow, LibvlcException);

You can then do what you want with the window.

JeffM-35
New Cone
New Cone
Posts: 4
Joined: 13 Dec 2007 15:08

Re: libvlc - how to catch events

Postby JeffM-35 » 14 Dec 2007 03:31

Thanks for the reply jboileau. Yes, I am creating my own window and successfully passing the handle to the libvlc_video_set_parent. In fact, I can intercept keyboard events no problem, even mouse movement events, but for whatever reason not the double mouse click - the event causes the window to toggle fullscreen. I'm stuck.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 12 guests