Page 1 of 1

Force fullscreen to display (linux) (X11)

Posted: 24 Jul 2011 18:09
by IronLegend
What I have:
LibVLC application that plays music and video, that switches automatically to full screen.
Fullscreen now defaults to the active screen (eg your clicking a website on screen 1 while you want to watch a movie on screen 2, it fullscreens to screen 1. instead of screen 2 where the application is located. )

What I want to do:
Set fullscreen to screen 2.

What I have tried:
I've been playing with media options and I cant seem to get video-x video-y to work, the rest works fine.

Code: Select all

//begin loading media... libvlc_media_t * media = libvlc_media_new_path( vlcinst, path.c_str() ); libvlc_media_add_option( media, ":video-y=1" ); libvlc_media_add_option( media, ":video-x=1920" ); setupplaylist( media ); //do more stuff.....
Are there any other options or a workaround for video-x/y?

Re: Force fullscreen to display (linux) (X11)

Posted: 24 Jul 2011 20:22
by Rémi Denis-Courmont
The details of fullscreen mode are implemented by the X11 window manager, whichever you use, not by VLC. Thus, there is no way to control it directly from LibVLC.

Re: Force fullscreen to display (linux) (X11)

Posted: 24 Jul 2011 22:13
by IronLegend
The details of fullscreen mode are implemented by the X11 window manager, whichever you use, not by VLC. Thus, there is no way to control it directly from LibVLC.
Found a work around for KDE and a possible workaround for Gnome

KDE:
* Add window specific instructions:
Settings -> Window Behaviour -> Window-Specific -> New..
Window:
Window class: vlc
Window role: vlc-video
Window Extra:
Select "Normal Window"
Window title: VLC media player (TODO: modify so it is unique for your application?)
Geometry:
Add your desired position.

Gnome: (untested)
Use devilspie to force the window to a location.
config:

Code: Select all

(if (and (is (window_class) "vlc") (is (window_role) "vlc-video") (is (window_name) "VLC media player" )) (geometry "+x+y"))

Re: Force fullscreen to display (linux) (X11)

Posted: 21 May 2013 00:29
by vinifr
So, is it not possible to playback a video using only libvlc? http://wiki.videolan.org/LibVLC_Tutorial (Sample LibVLC Code)
Must to use a secondary library like libgtk, libqt, libsdl or libx11?

Re: Force fullscreen to display (linux) (X11)

Posted: 22 May 2013 19:45
by Rémi Denis-Courmont
You need a window manager running. You don't need a library as such.