From aacd8897f8cd8bc22da07c60cfc1ab35126763cd Mon Sep 17 00:00:00 2001 From: fduncanh Date: Sun, 2 Oct 2022 19:32:59 -0400 Subject: [PATCH] add fullscreen-toggle-mode=alt-enter to -vs d3d11videosink --- README.html | 16 ++++++++++------ README.md | 11 +++++------ README.txt | 15 +++++++++------ uxplay.1 | 2 +- uxplay.cpp | 12 ++++++++++-- 5 files changed, 35 insertions(+), 21 deletions(-) diff --git a/README.html b/README.html index de5b351..2f2af64 100644 --- a/README.html +++ b/README.html @@ -557,16 +557,20 @@ by its GUID, which can be found using has a form like \{0.0.0.00000000\}.\{98e35b2b-8eba-412e-b840-fd2c2492cf44\}. If “device” is not specified, the default audio device is -used. The executable uxplay.exe can also be run without the MSYS2 -environment (using the Windows Terminal, with -C:\msys64\mingw64\bin\uxplay).

+used.

If you wish to specify the videosink using the -vs <videosink> option, some choices for <videosink> are d3d11videosink, d3dvideosink, glimagesink, -gtksink. You can get the ability to toggle into and out of -fullscreen mode using the Alt-Enter key combination with

-
uxplay -vs "d3d11videosink fullscreen-toggle-mode=alt-enter"
+gtksink. With Direct3D 11.0 or greater, you can get the +ability to toggle into and out of fullscreen mode using the Alt-Enter +key combination with option +-vs "d3d11videosink fullscreen-toggle-mode=alt-enter". For +convenience, this option will always be set if +“-vs d3d11videosink” is used.

+

The executable uxplay.exe can also be run without the MSYS2 +environment, in the Windows Terminal, with +C:\msys64\mingw64\bin\uxplay.

Usage

Options:

-n server_name (Default: UxPlay); diff --git a/README.md b/README.md index 0fc8bb8..7dcbf29 100644 --- a/README.md +++ b/README.md @@ -469,16 +469,15 @@ uxplay -as 'wasapisink low_latency=true device=\"\"' where `` specifies an available audio device by its GUID, which can be found using "`gst-device-monitor-1.0 Audio`": ```` has a form like ```\{0.0.0.00000000\}.\{98e35b2b-8eba-412e-b840-fd2c2492cf44\}```. If "`device`" is not specified, the -default audio device is used. The executable uxplay.exe can also be run without the MSYS2 environment (using -the Windows Terminal, with `C:\msys64\mingw64\bin\uxplay`). +default audio device is used. If you wish to specify the videosink using the `-vs ` option, some choices for `` are `d3d11videosink`, ``d3dvideosink``, ```glimagesink```, -`gtksink`. You can get the ability to toggle into and out of fullscreen mode using the Alt-Enter key combination with +`gtksink`. With Direct3D 11.0 or greater, you can get the ability to toggle into and out of fullscreen mode using the Alt-Enter key combination with +option `-vs "d3d11videosink fullscreen-toggle-mode=alt-enter"`. For convenience, this option will always be set if "``-vs d3d11videosink``" is used. -``` -uxplay -vs "d3d11videosink fullscreen-toggle-mode=alt-enter" -``` +The executable uxplay.exe can also be run without the MSYS2 environment, in +the Windows Terminal, with `C:\msys64\mingw64\bin\uxplay`. # Usage diff --git a/README.txt b/README.txt index 8a34043..7dd3cc9 100644 --- a/README.txt +++ b/README.txt @@ -568,16 +568,19 @@ supports additional options such as where `` specifies an available audio device by its GUID, which can be found using "`gst-device-monitor-1.0 Audio`": `` has a form like `\{0.0.0.00000000\}.\{98e35b2b-8eba-412e-b840-fd2c2492cf44\}`. If -"`device`" is not specified, the default audio device is used. The -executable uxplay.exe can also be run without the MSYS2 environment -(using the Windows Terminal, with `C:\msys64\mingw64\bin\uxplay`). +"`device`" is not specified, the default audio device is used. If you wish to specify the videosink using the `-vs ` option, some choices for `` are `d3d11videosink`, `d3dvideosink`, -`glimagesink`, `gtksink`. You can get the ability to toggle into and out -of fullscreen mode using the Alt-Enter key combination with +`glimagesink`, `gtksink`. With Direct3D 11.0 or greater, you can get the +ability to toggle into and out of fullscreen mode using the Alt-Enter +key combination with option +`-vs "d3d11videosink fullscreen-toggle-mode=alt-enter"`. For +convenience, this option will always be set if "`-vs d3d11videosink`" is +used. - uxplay -vs "d3d11videosink fullscreen-toggle-mode=alt-enter" +The executable uxplay.exe can also be run without the MSYS2 environment, +in the Windows Terminal, with `C:\msys64\mingw64\bin\uxplay`. # Usage diff --git a/uxplay.1 b/uxplay.1 index 5c914c9..3291470 100644 --- a/uxplay.1 +++ b/uxplay.1 @@ -47,7 +47,7 @@ UxPlay 1.56: An open\-source AirPlay mirroring server based on RPiPlay .IP choices: ximagesink,xvimagesink,vaapisink,glimagesink, .IP - gtksink,waylandsink,osximagesink,kmssink,fpsdisplaysink,... + gtksink,waylandsink,osximagesink,kmssink,d3d11videosink,... .PP .TP \fB\-vs\fR 0 Streamed audio only, with no video display window. diff --git a/uxplay.cpp b/uxplay.cpp index 2c7b4d6..6d0fabf 100644 --- a/uxplay.cpp +++ b/uxplay.cpp @@ -402,7 +402,7 @@ static void print_info (char *name) { printf(" another choice when using v4l2h264decode: v4l2convert\n"); printf("-vs ... Choose the GStreamer videosink; default \"autovideosink\"\n"); printf(" some choices: ximagesink,xvimagesink,vaapisink,glimagesink,\n"); - printf(" gtksink,waylandsink,osximagesink,kmssink,fpsdisplaysink etc.\n"); + printf(" gtksink,waylandsink,osximagesink,kmssink,d3d11videosink etc.\n"); printf("-vs 0 Streamed audio only, with no video display window\n"); printf("-v4l2 Use Video4Linux2 for GPU hardware h264 decoding\n"); printf("-bt709 A workaround (bt709 color) that may be needed with -rpi\n"); @@ -824,7 +824,15 @@ int main (int argc, char *argv[]) { } if (fullscreen && use_video) { - videosink.append(" fullscreen=true"); + if (videosink == "waylandsink" || videosink == "vaapisink") { + videosink.append(" fullscreen=true"); + } + } + + if (videosink == "d3d11videosink" && use_video) { + videosink.append(" fullscreen-toggle-mode=alt-enter"); + printf("d3d11videosink is being used with option fullscreen-toggle-mode=alt-enter\n" + "Use Alt-Enter key combination to toggle into/out of full-screen mode\n"); } if (bt709_fix && use_video) {