DVD Menu Interaction

This forum is about all development around libVLC.
Flicker
New Cone
New Cone
Posts: 2
Joined: 28 Feb 2010 15:35

DVD Menu Interaction

Postby Flicker » 01 Mar 2010 14:55

Hi,
I have a project where I need to play a DVD to an OpenGL texture, I've achieved this by outputting the DVD into an SDL surface and then copying that to an OpenGL texture, however doing this I lose the ability to interact with the DVD menu (chapter selection, play, sound options etc). I was wondering if there was a solution to this problem? I've tried searching but found nothing. I thought about perhaps rendering to the default DirectX window (which allows interaction), once play has been clicked grabbing the frames and outputting it to an OpenGL texture this way?

Rémi Denis-Courmont
Developer
Developer
Posts: 15280
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: DVD Menu Interaction

Postby Rémi Denis-Courmont » 01 Mar 2010 17:56

Copying frames is a bad idea because it is slow. Grabbing frames -from the video memory- is an extremely bad idea because it is extremely slow.

Basically, you need to extend the LibVLC API.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Mongrel
Blank Cone
Blank Cone
Posts: 11
Joined: 12 Jul 2009 11:35

Re: DVD Menu Interaction

Postby Mongrel » 02 Mar 2010 07:30

Use the vmem output module to copy the frame data into an OpenGL surface. Then use "__var_SetInteger" to control the DVD menu.

You need to do this in C++ though (or C++/CLI, which I am doing)

libvlc_instance_t * inst;
[..init libvlc instance..]

vlc_object_t* obj = libvlc_get_vlc_instance(inst);

These are the values for simple DVD navigation:
__var_SetInteger(obj, "key-pressed", KEY_DOWN);
__var_SetInteger(obj, "key-pressed", KEY_UP);
__var_SetInteger(obj, "key-pressed", KEY_LEFT);
__var_SetInteger(obj, "key-pressed", KEY_RIGHT);
__var_SetInteger(obj, "key-pressed", KEY_ENTER);


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 34 guests