Page 1 of 1

No active video output when going to fullscreen

Posted: 10 Dec 2009 12:37
by juraj
Hi,

I am using libvlc_toggle_fullscreen function to go to the fullscreen mode. Everythink works when video is playing, but when the video ends and I see the last frame of video on the screen - when I call the libvlc_toggle_fullscreen function at this time I get an error: No active video output. I would like to go to fullscreen also at this point even though video is at the end (and in fullscreen just show the last frame). How can I do that? Moreover double-click on the video, which is managed by VLC, is working also at the end of video with last frame. So how they are doing that?

Thanks,
Juraj

Re: No active video output when going to fullscreen

Posted: 10 Dec 2009 18:01
by Rémi Denis-Courmont
VLC cannot do that. When there is no video, there is no window, so it cannot be fullscreen. Either you must configure it to render a static image (using the fake input), or you must create your own fullscreen window and embed VLC inside it.

Re: No active video output when going to fullscreen

Posted: 10 Dec 2009 19:07
by juraj
Thanks for reply. Can you please tell me, how I can configure vlc to render a static image? I can make a snapshot before the end and then I can tell VLC to display it at the end. Is this a way how vlc do it on double click event? Because as I said, vlc player can go to fullscreen with double click when video is already ended.

Thanks for your help.
Juraj

Re: No active video output when going to fullscreen

Posted: 10 Dec 2009 22:37
by juraj
One more question: is it possible to prevent vlc from responding to double click event. If I want to build a custom video widget which handles fullscreen on its own I need to prevent vlc to respond to double-click. I know there is a startup argument "--vout-event=3", but this is not working on Windows. Where in vlc source code is double-click event handled? I cannot find it...

Thanks,
Juraj

Re: No active video output when going to fullscreen

Posted: 10 Dec 2009 22:49
by Rémi Denis-Courmont
As you said, vout-event was never implemented on Windows...

Re: No active video output when going to fullscreen

Posted: 11 Dec 2009 08:56
by Jean-Baptiste Kempf
As you said, vout-event was never implemented on Windows...
Not that it is difficult to do... But I'd prefer the vout rework to be merged for that.

Re: No active video output when going to fullscreen

Posted: 05 Jan 2010 19:10
by juraj
Mouse and key events for windows are handled in libdirect3d_plugin.dll. To implement vout-event=3 (disable handling mouse and key events in vlc) also for windows I changed modules\video_output\msw\events.c this way:

Code: Select all

void* EventThread( vlc_object_t *p_this ) { .... // New stuff ... /* key and mouse event handling */ int voutEvent = var_CreateGetInteger( p_event->p_vout, "vout-event" ); msg_Dbg( p_event, "voutEvent is %i", voutEvent ); // ... New stuff /* Main loop */ /* GetMessage will sleep if there's no message in the queue */ while( vlc_object_alive (p_event) && GetMessage( &msg, 0, 0, 0 ) ) { /* Check if we are asked to exit */ if( !vlc_object_alive (p_event) ) break; // New stuff ... if(voutEvent == 3) { if(p_event->p_vout->p_sys->parent_window != NULL) { if( msg.message == WM_MOUSEMOVE || msg.message == WM_NCMOUSEMOVE || msg.message == WM_LBUTTONDBLCLK || msg.message == WM_LBUTTONDOWN || msg.message == WM_LBUTTONUP || msg.message == WM_KEYDOWN || msg.message == WM_SYSKEYDOWN ) { PostMessage(p_event->p_vout->p_sys->hparent, msg.message, msg.wParam, msg.lParam); } } continue; } // ... New stuff switch( msg.message ) { case WM_MOUSEMOVE: vout_PlacePicture( p_event->p_vout, p_event->p_vout->p_sys->i_window_width, p_event->p_vout->p_sys->i_window_height, &i_x, &i_y, &i_width, &i_height ); ... }
recompiled vlc and it is working.

Re: No active video output when going to fullscreen

Posted: 12 Mar 2010 15:49
by Jo2003
Thanks for the hint. It works ... but for me it looks like the continue should have another place. Also I'd prefer to redirect only the messages you really want to handle yourself.

Code: Select all

// New stuff ... if(voutEvent == 3) { if(p_event->p_vout->p_sys->parent_window != NULL) { if( msg.message == WM_LBUTTONDBLCLK || ... ... msg.message == WM_KEYDOWN ) { PostMessage(p_event->p_vout->p_sys->hparent, msg.message, msg.wParam, msg.lParam); continue; } } } // ... New stuff
Jo2003