Page 1 of 1

DVD Menu Interaction

Posted: 01 Mar 2010 14:55
by Flicker
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?

Re: DVD Menu Interaction

Posted: 01 Mar 2010 17:56
by RĂ©mi Denis-Courmont
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.

Re: DVD Menu Interaction

Posted: 02 Mar 2010 07:30
by Mongrel
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);