(libvlc) Need ability to disable input / hotkeys

Feature requests for VLC.
Vek
New Cone
New Cone
Posts: 1
Joined: 14 Apr 2008 05:36

(libvlc) Need ability to disable input / hotkeys

Postby Vek » 14 Apr 2008 05:44

Currently if you load up the player via libvlc or the new media player interfaces (public interfaces) and embed them in an application, vlc will automatically swallow and process all mouse and keyboard input that hits its window, and not forward it to the outlying application.

This makes it very hard to embed video windows inside things like opengl windows and so on, as the moment the user double clicks on the video window (for example) it goes full screen. And there's no way to stop that.

Looking at the source code, it seems that each particular video out (SDL, DirectX, GL) has input handling built into the vout module, with no clear way to seperate, so this task might be a bit more difficult than it seems.

However, for embedding, its kind of a necessary thing for the parent app to be able to handle things like that. A custom opengl-accelerated media player (as in, smooth transformations and so on) is not the only thing that gets hindered by this. For example, if someone were to try to use it to play video inside a game, (perhaps during a cutscene, or even just in the corner, say, as a tutorial or something)... or inside a box as part of another application, the user could double click on that box and whoops... the app would no longer get any further events and there would be no way to prevent it from going full screen...

As it stands now, its pretty clean and easy to embed VLC thing in a QT4 window, and it works pretty well, but it 'steals' all input, denying it to the underlying application, whenever the mouse is over it. This appears to be how it is supposed to work, by design of the architecture, but I'm thinking a simple --no-hotkeys or a --no-module <modulename> or just --no-mouse-input or something... optional stuff. It would improve its ability to be embedded.

Also of note is that this behavior is inconsistent across platforms. For example, in ubuntu/Qt4, it always swallows all keyboard and mouse events, and always denies them to the underlying window, regardless of fullscreen status. Wheras in win32/Qt4, it absorbs all double click events (toggling fullscreen), but only consumes keyboard events while in full screen.

Unless I'm missing something and there's already a way to do this? I doubt it though, I've been digging into the code - the code to handle mouse double clicks in win32, for example, is directly in the video out module, and directly installs a window message function which intercepts the win32 double click event, and immediately requests full screen toggle.

I guess if theres an actual desire for this type of option, I could look into doing it, but so far it looks like the only way to do it would be to add those options in and then alter every video out module to check those options before actually capturing events, etc.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: (libvlc) Need ability to disable input / hotkeys

Postby Jean-Baptiste Kempf » 14 Apr 2008 06:14

mail vlc-devel@
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

gautham
New Cone
New Cone
Posts: 8
Joined: 22 Aug 2009 06:09

Re: (libvlc) Need ability to disable input / hotkeys

Postby gautham » 04 Mar 2010 11:58

Hi there
Is there a possibility to handle mouse events in VLC plugin? I mean, I would like to do things like Pan, Tilt or Zoom using the VLC plugin APIs. Let me know.

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: (libvlc) Need ability to disable input / hotkeys

Postby VLC_help » 04 Mar 2010 16:21

Is there a possibility to handle mouse events in VLC plugin?
It is. Puzzle interactive filter uses mouse in case you want sample code
http://git.videolan.org/?p=vlc.git;a=bl ... r/puzzle.c;


Return to “VLC media player Feature Requests”

Who is online

Users browsing this forum: No registered users and 8 guests