[vlc-devel] [PATCH 4/4] win32: Send fullscreen to specific monitor

Gabriel Luci github at luci.ca
Fri Oct 25 21:21:13 CEST 2019


The issue at least with Windows is that there is no Windows API function to
get monitor details by the name, only by the handle. So if we save the name
of the device ("\\.\DISPLAY2" for example), then the only way to translate
the name into the handle is to enumerate the displays.

On Fri, Oct 25, 2019 at 3:14 PM Alexandre Janniaux <ajanni at videolabs.io>
wrote:

> Probably not bugs, with regards to the documentation for
> this which is incomplete, but I agree with Rémi that it
> should also work with caching when the module is
> initialized, because it should report new or removed
> outputs.
>
> When we're doing the enumeration from the UI, it doesn't
> matter and we shouldn't do caching as there is not enough
> lifetime for interesting storage anyway. As it is only for
> configuration it almost doesn't matter in this design.
>
> However in your scenario, the window will indeed not do the
> correct behaviour with the current window implementation,
> as the fullscreen state and information is not stored and
> restored during Enable. That's a very good point.
>
> The pivotal point here is that requests like SetFullscreen
> can be applied with the window being disabled. It's not
> very documented but the main motive behind is to be able to
> configure the video playback surface before actually making
> it visible to the user, while keeping the window provider
> module running so as to reports outputs. It's a bit
> confusing from a module provider implementor point of view
> but is far easier to use from the API user point of view
> and provides a better UX than in previous 3.0.
>
> We probably want something like not changing screen if the
> video is already started, or if it goes to the next one,
> but the interface might want to set the correct screen when
> the playback will be stopped.
>
> Regards,
> --
> Alexandre Janniaux
> Videolabs
>
> On Fri, Oct 25, 2019 at 08:49:03PM +0300, Rémi Denis-Courmont wrote:
> > Le perjantaina 25. lokakuuta 2019, 20.37.06 EEST Gabriel Luci a écrit :
> > > I would normally agree, but monitors can be unplugged and plugged in
> at any
> > > time (especially wireless displays). Consider this scenario:
> > >
> > > 1. A chosen monitor is selected and VLC closed.
> > > 2. The chosen monitor is disconnected.
> > > 3. The next time VLC is run, and video played, the enumeration
> (without the
> > > chosen monitor) is saved, and video plays on the primary monitor.
> > > 4. You realize your forgot to plug in your chosen monitor, and do so.
> > >
> > > In that case, VLC will not play video on the chosen monitor until the
> > > enumeration is forced to happen again (restarting VLC or opening
> > > preferences, for example).
> >
> > Sure it will. Unless you write bugs.
> >
> > --
> > Rémi Denis-Courmont
> > http://www.remlab.net/
> >
> >
> >
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20191025/b895fc8d/attachment.html>


More information about the vlc-devel mailing list