Force fullscreen to display (linux) (X11)

This forum is about all development around libVLC.
IronLegend
New Cone
New Cone
Posts: 3
Joined: 24 Jul 2011 17:53
VLC version: 1.1.11
Operating System: Linux-2.6.32-33

Force fullscreen to display (linux) (X11)

Postby IronLegend » 24 Jul 2011 18:09

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?

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

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

Postby Rémi Denis-Courmont » 24 Jul 2011 20:22

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

IronLegend
New Cone
New Cone
Posts: 3
Joined: 24 Jul 2011 17:53
VLC version: 1.1.11
Operating System: Linux-2.6.32-33

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

Postby IronLegend » 24 Jul 2011 22:13

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"))

vinifr
New Cone
New Cone
Posts: 9
Joined: 20 May 2013 19:18

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

Postby vinifr » 21 May 2013 00:29

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?

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

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

Postby Rémi Denis-Courmont » 22 May 2013 19:45

You need a window manager running. You don't need a library as such.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 3 guests