No active video output when going to fullscreen

This forum is about all development around libVLC.
juraj
Blank Cone
Blank Cone
Posts: 27
Joined: 05 Dec 2009 10:41

No active video output when going to fullscreen

Postby juraj » 10 Dec 2009 12:37

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

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

Re: No active video output when going to fullscreen

Postby Rémi Denis-Courmont » 10 Dec 2009 18:01

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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

juraj
Blank Cone
Blank Cone
Posts: 27
Joined: 05 Dec 2009 10:41

Re: No active video output when going to fullscreen

Postby juraj » 10 Dec 2009 19:07

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

juraj
Blank Cone
Blank Cone
Posts: 27
Joined: 05 Dec 2009 10:41

Re: No active video output when going to fullscreen

Postby juraj » 10 Dec 2009 22:37

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

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

Re: No active video output when going to fullscreen

Postby Rémi Denis-Courmont » 10 Dec 2009 22:49

As you said, vout-event was never implemented on Windows...
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

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: No active video output when going to fullscreen

Postby Jean-Baptiste Kempf » 11 Dec 2009 08:56

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.
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.

juraj
Blank Cone
Blank Cone
Posts: 27
Joined: 05 Dec 2009 10:41

Re: No active video output when going to fullscreen

Postby juraj » 05 Jan 2010 19:10

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.

Jo2003
Blank Cone
Blank Cone
Posts: 67
Joined: 08 Feb 2010 13:29

Re: No active video output when going to fullscreen

Postby Jo2003 » 12 Mar 2010 15:49

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


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 1 guest