mirror of
https://github.com/morgan9e/UxPlay
synced 2026-04-14 00:04:13 +09:00
add "-nc no" to unset nc option (for macOS, where -nc is default)
This commit is contained in:
27
README.html
27
README.html
@@ -841,23 +841,18 @@ another error (about videometa) that shows up in the GStreamer warnings.
|
||||
“<code>-vsync no</code>”</strong> (you can add a line “vsync no” in the
|
||||
uxplayrc configuration file).</p></li>
|
||||
<li><p>On macOS with this installation of GStreamer, the only videosinks
|
||||
available seem to be glimagesink (default choice made by autovideosink)
|
||||
and osxvideosink. The window title does not show the Airplay server
|
||||
name, but the window is visible to screen-sharing apps (e.g., Zoom). The
|
||||
only available audiosink seems to be osxaudiosink.</p></li>
|
||||
<li><p>The option -nc is always used, whether or not it is selected.
|
||||
This is a workaround for a problem with GStreamer videosinks on macOS:
|
||||
if the GStreamer pipeline is destroyed while the mirror window is still
|
||||
open, a segfault occurs.</p></li>
|
||||
<li><p>In the case of glimagesink, the resolution settings “-s wxh” do
|
||||
available are glimagesink (default choice made by autovideosink) and
|
||||
osxvideosink. The window title does not show the Airplay server name,
|
||||
but the window can be shared on Zoom. Because of issues with
|
||||
glimagesink, you may find osxvideosink works better. The only available
|
||||
audiosink is osxaudiosink.</p></li>
|
||||
<li><p>The option -nc is currently used by default om macOS, This is a
|
||||
workaround for window-closing problems with GStreamer videosinks on
|
||||
macOS. In anticipation of fixes, this option can be canceled with “-nc
|
||||
no”, if not needed.</p></li>
|
||||
<li><p>In the case of glimagesink, the resolution settings “-s wxh” may
|
||||
not affect the (small) initial OpenGL mirror window size, but the window
|
||||
can be expanded using the mouse or trackpad. In contrast, a window
|
||||
created with “-vs osxvideosink” is initially big, but has the wrong
|
||||
aspect ratio (stretched image); in this case the aspect ratio changes
|
||||
when the window width is changed by dragging its side; the option
|
||||
<code>-vs "osxvideosink force-aspect-ratio=true"</code> can be used to
|
||||
make the window have the correct aspect ratio when it first
|
||||
opens.</p></li>
|
||||
can be expanded using the mouse or trackpad.</p></li>
|
||||
</ul>
|
||||
<h2
|
||||
id="building-uxplay-on-microsoft-windows-using-msys2-with-the-mingw-64-compiler.">Building
|
||||
|
||||
26
README.md
26
README.md
@@ -834,25 +834,21 @@ downloads, "UxPlay" for "git clone" downloads) and build/install with
|
||||
the uxplayrc configuration file).
|
||||
|
||||
- On macOS with this installation of GStreamer, the only videosinks
|
||||
available seem to be glimagesink (default choice made by
|
||||
autovideosink) and osxvideosink. The window title does not show the
|
||||
Airplay server name, but the window is visible to screen-sharing
|
||||
apps (e.g., Zoom). The only available audiosink seems to be
|
||||
available are glimagesink (default choice made by
|
||||
autovideosink) and osxvideosink.
|
||||
The window title does not show the
|
||||
Airplay server name, but the window can be shared on Zoom.
|
||||
Because of issues with glimagesink, you may find
|
||||
osxvideosink works better. The only available audiosink is
|
||||
osxaudiosink.
|
||||
|
||||
- The option -nc is always used, whether or not it is selected. This
|
||||
is a workaround for a problem with GStreamer videosinks on macOS: if
|
||||
the GStreamer pipeline is destroyed while the mirror window is still
|
||||
open, a segfault occurs.
|
||||
- The option -nc is currently used by default om macOS, This
|
||||
is a workaround for window-closing problems with GStreamer videosinks on macOS.
|
||||
In anticipation of fixes, this option can be canceled with "-nc no", if not needed.
|
||||
|
||||
- In the case of glimagesink, the resolution settings "-s wxh" do not
|
||||
- In the case of glimagesink, the resolution settings "-s wxh" may not
|
||||
affect the (small) initial OpenGL mirror window size, but the window
|
||||
can be expanded using the mouse or trackpad. In contrast, a window
|
||||
created with "-vs osxvideosink" is initially big, but has the wrong
|
||||
aspect ratio (stretched image); in this case the aspect ratio
|
||||
changes when the window width is changed by dragging its side; the
|
||||
option `-vs "osxvideosink force-aspect-ratio=true"` can be used to
|
||||
make the window have the correct aspect ratio when it first opens.
|
||||
can be expanded using the mouse or trackpad.
|
||||
|
||||
## Building UxPlay on Microsoft Windows, using MSYS2 with the MinGW-64 compiler.
|
||||
|
||||
|
||||
27
README.txt
27
README.txt
@@ -850,25 +850,20 @@ downloads, "UxPlay" for "git clone" downloads) and build/install with
|
||||
the uxplayrc configuration file).
|
||||
|
||||
- On macOS with this installation of GStreamer, the only videosinks
|
||||
available seem to be glimagesink (default choice made by
|
||||
autovideosink) and osxvideosink. The window title does not show the
|
||||
Airplay server name, but the window is visible to screen-sharing
|
||||
apps (e.g., Zoom). The only available audiosink seems to be
|
||||
osxaudiosink.
|
||||
available are glimagesink (default choice made by autovideosink) and
|
||||
osxvideosink. The window title does not show the Airplay server
|
||||
name, but the window can be shared on Zoom. Because of issues with
|
||||
glimagesink, you may find osxvideosink works better. The only
|
||||
available audiosink is osxaudiosink.
|
||||
|
||||
- The option -nc is always used, whether or not it is selected. This
|
||||
is a workaround for a problem with GStreamer videosinks on macOS: if
|
||||
the GStreamer pipeline is destroyed while the mirror window is still
|
||||
open, a segfault occurs.
|
||||
- The option -nc is currently used by default om macOS, This is a
|
||||
workaround for window-closing problems with GStreamer videosinks on
|
||||
macOS. In anticipation of fixes, this option can be canceled with
|
||||
"-nc no", if not needed.
|
||||
|
||||
- In the case of glimagesink, the resolution settings "-s wxh" do not
|
||||
- In the case of glimagesink, the resolution settings "-s wxh" may not
|
||||
affect the (small) initial OpenGL mirror window size, but the window
|
||||
can be expanded using the mouse or trackpad. In contrast, a window
|
||||
created with "-vs osxvideosink" is initially big, but has the wrong
|
||||
aspect ratio (stretched image); in this case the aspect ratio
|
||||
changes when the window width is changed by dragging its side; the
|
||||
option `-vs "osxvideosink force-aspect-ratio=true"` can be used to
|
||||
make the window have the correct aspect ratio when it first opens.
|
||||
can be expanded using the mouse or trackpad.
|
||||
|
||||
## Building UxPlay on Microsoft Windows, using MSYS2 with the MinGW-64 compiler.
|
||||
|
||||
|
||||
4
uxplay.1
4
uxplay.1
@@ -123,7 +123,9 @@ UxPlay 1.72: An open\-source AirPlay mirroring (+ audio streaming) server:
|
||||
.TP
|
||||
\fB\-nofreeze\fR Do NOT leave frozen screen in place after reset.
|
||||
.TP
|
||||
\fB\-nc\fR Do NOT close video window when client stops mirroring
|
||||
\fB\-nc\fR Do NOT close video window when client stops mirroring.
|
||||
.TP
|
||||
\fB\-nc\fR no Cancel the -nc option (DO close video window).
|
||||
.TP
|
||||
\fB\-nohold\fR Drop current connection when new client connects.
|
||||
.TP
|
||||
|
||||
21
uxplay.cpp
21
uxplay.cpp
@@ -103,7 +103,11 @@ static unsigned char compression_type = 0;
|
||||
static std::string audiosink = "autoaudiosink";
|
||||
static int audiodelay = -1;
|
||||
static bool use_audio = true;
|
||||
#if __APPLE__
|
||||
static bool new_window_closing_behavior = false;
|
||||
#else
|
||||
static bool new_window_closing_behavior = true;
|
||||
#endif
|
||||
static bool close_window;
|
||||
static std::string video_parser = "h264parse";
|
||||
static std::string video_decoder = "decodebin";
|
||||
@@ -714,7 +718,8 @@ static void print_info (char *name) {
|
||||
printf("-md <fn> In Airplay Audio (ALAC) mode, write metadata text to file <fn>\n");
|
||||
printf("-reset n Reset after n seconds of client silence (default n=%d, 0=never)\n", MISSED_FEEDBACK_LIMIT);
|
||||
printf("-nofreeze Do NOT leave frozen screen in place after reset\n");
|
||||
printf("-nc Do NOT Close video window when client stops mirroring\n");
|
||||
printf("-nc Do NOT Close video window when client stops mirroring\n");
|
||||
printf("-nc no Cancel the -nc option (DO close video window) \n");
|
||||
printf("-nohold Drop current connection when new client connects.\n");
|
||||
printf("-restrict Restrict clients to those specified by \"-allow <deviceID>\"\n");
|
||||
printf(" UxPlay displays deviceID when a client attempts to connect\n");
|
||||
@@ -1063,6 +1068,13 @@ static void parse_arguments (int argc, char *argv[]) {
|
||||
exit(1);
|
||||
} else if (arg == "-nc") {
|
||||
new_window_closing_behavior = false;
|
||||
if (i < argc - 1) {
|
||||
if (strlen(argv[i+1]) == 2 && strncmp(argv[i+1], "no", 2) == 0) {
|
||||
new_window_closing_behavior = true;
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
} else if (arg == "-avdec") {
|
||||
video_parser.erase();
|
||||
video_parser = "h264parse";
|
||||
@@ -2376,9 +2388,10 @@ int main (int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
#if __APPLE__
|
||||
/* force use of -nc option on macOS */
|
||||
LOGI("macOS detected: using -nc option as workaround for GStreamer problem");
|
||||
new_window_closing_behavior = false;
|
||||
/* warn about default use of -nc option on macOS */
|
||||
if (!new_window_closing_behavior) {
|
||||
LOGI("UxPlay on macOS is using -nc option as workaround for GStreamer problem: use \"-nc no\" to omit workaround");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
Reference in New Issue
Block a user