FDH2 / UxPlay

AirPlay Unix mirroring server
GNU General Public License v3.0
1.35k stars 72 forks source link

Windows Fullscreen support #133

Closed xshrinix closed 1 year ago

xshrinix commented 1 year ago

I am currently using uxplay in windows environment. Is there any possible way to use fullscreen mode? I wanted to remove the title bar also (Shown in the screenshot). Command i am using is - uxplay.exe -n AirplayRec -nh -s 1920x1080@60 -as "wasapisink low_latency=true" -vs glimagesink. device - Ipad. Screenshot (15)

fduncanh commented 1 year ago

Try using the -fs option which will work if "fullscreen=true" is an option of the videosink being used by GStreamer. (On Linux this works for waylandsink and vaapisink)

I am not familiar with the Windows videosinks and possible choices among them. If you don't specify which one to use, the "autovideosink" algorithm chooses one for you.

Find out which videosink is being used by gstreamer, and what choices are availble. (and what extra options they support)

export GST_DEBUG=2 (or maybe 4,5 6 etc) may allow you to work out which one.

=================== EDIT: it seems that d3d11videosink supports fullscreen mode.

try "uxplay -vs d3d11videosink -fs"

There is also a "fullscreen-toggle-mode=property" option that the d3d11videosink documentation mentions that might also need to be invoked. if I am reading the doc correctly, this would be

"uxplay -vs "d3d11videosink fullscreen-toggle-mode=property fullscreen=true"

"uxplay -vs "d3d11videosink fullscreen-toggle-mode=alt-enter"

looks like it would allow you to switch in and out of fullscreen mode with the alt-enter keyboard combination Maybe fullscreen=true (or =false) here just selects whether you are initially in full-screen or not.

Windows Videosinks (in gstreamer-plugins-bad?)

https://gstreamer.freedesktop.org/documentation/d3d11/d3d11videosink.html?gi-language=c

This video sink is based on Direct3D11 and is the recommended element on Windows. It supports VideoOverlay interface and rescaling/colorspace conversion in zero-copy manner. This element is the most performant and featureful video sink element on Windows.

https://gstreamer.freedesktop.org/documentation/d3d/index.html?gi-language=c

This video sink is based on Direct3D9. It supports rescaling and filtering of the scaled image to alleviate aliasing. It implements the VideoOverlay interface, so the video window can be re-parented (embedded inside other windows). This element is not recommended for applications targetting Windows 8 or more recent.

This video sink is based on Direct Show. It can use different rendering back-ends, like EVR, VMR9 or VMR7, EVR only being available on Windows Vista or more recent. It supports rescaling and filtering of the scaled image to alleviate aliasing. It implements the VideoOverlay interface, so the video window can be re-parented (embedded inside other windows). This element is not recommended in most cases.

fduncanh commented 1 year ago

OK I tested.

what you want is

uxplay -vs "d3d11videosink fullscreen-toggle-mode=alt-enter"

(plus any other options)

You toggle into and out of full-screen mode with the alt+enter key combination.

The working videosinks on my Windows 10 are d3d11videosink (does fullscreen) d3dvideosink glimagesink gtksink fpsdisplaysink (for testing, shows fps etc)

fduncanh commented 1 year ago

The info about fullscreen mode has been added to the Windows section of the README.

xshrinix commented 1 year ago

Thanks for the quick reply. Provided solution worked out for me.

fduncanh commented 1 year ago

yesterday I did a new small update that makes the option that allows alt-enter for fullscreen the default for -vs d3d11video.

If you didnt get that version, its on github now.