mirror of
https://github.com/morgan9e/UxPlay
synced 2026-04-14 00:04:13 +09:00
enforce -nc option in macOS, as a workaround for a gstreamer issue
This commit is contained in:
@@ -82,8 +82,8 @@
|
||||
<p><strong>-vs 0</strong> suppresses display of streamed video, but plays streamed audio. (The client’s screen is still mirrored at a reduced rate of 1 frame per second, but is not rendered or displayed.) This feature (which streams audio in AAC audio format) is now probably unneeded, as UxPlay can now stream superior-quality Apple Lossless audio without video in Airplay non-mirror mode.</p>
|
||||
<p><strong>-as <em>audiosink</em></strong> chooses the GStreamer audiosink, instead of letting autoaudiosink pick it for you. Some audiosink choices are: pulsesink, alsasink, osssink, oss4sink, and osxaudiosink (for macOS). Using quotes “…” might allow some parameters to be included with the audiosink name. (Some choices of audiosink might not work on your system.)</p>
|
||||
<p><strong>-as 0</strong> (or just <strong>-a</strong>) suppresses playing of streamed audio, but displays streamed video.</p>
|
||||
<p><strong>-nc</strong> maintains previous UxPlay < 1.45 behavior that does <strong>not close</strong> the video window when the the client sends the “Stop Mirroring” signal.</p>
|
||||
<p><strong>-t <em>timeout</em></strong> will cause the server to relaunch (without stopping uxplay) if no connections have been present during the previous <em>timeout</em> seconds. You may wish to use this if the Server is not visible to new Clients that were inactive when the Server was launched, and an idle Bonjour registration eventually becomes unavailable for new connections (this is a workaround for what may be due to a problem with your DNS-SD or Avahi setup). <em>This option should <strong>not</strong> be used on macOS, as a window created by GStreamer does not terminate correctly (it causes a segfault) if it is still open when the GStreamer pipeline is closed.</em></p>
|
||||
<p><strong>-nc</strong> maintains previous UxPlay < 1.45 behavior that does <strong>not close</strong> the video window when the the client sends the “Stop Mirroring” signal. <em>This option is currently used by default in macOS, as the window created in macOS by GStreamer does not terminate correctly (it causes a segfault) if it is still open when the GStreamer pipeline is closed.</em></p>
|
||||
<p><strong>-t <em>timeout</em></strong> will cause the server to relaunch (without stopping uxplay) if no connections have been present during the previous <em>timeout</em> seconds. You may wish to use this if the Server is not visible to new Clients that were inactive when the Server was launched, and an idle Bonjour registration eventually becomes unavailable for new connections (this is a workaround for what may be due to a problem with your DNS-SD or Avahi setup). <em>This option is currently disabled in macOS, for the same reason that requires the -nc option</em></p>
|
||||
<h1 id="troubleshooting">Troubleshooting</h1>
|
||||
<p>Note: <code>uxplay</code> is run from a terminal command line, and informational messages are written to the terminal.</p>
|
||||
<h3 id="uxplay-starts-but-stalls-after-initialized-server-sockets-appears-without-any-server-name-showing-on-the-client.">1. uxplay starts, but stalls after “Initialized server socket(s)” appears, <em>without any server name showing on the client</em>.</h3>
|
||||
|
||||
12
README.md
12
README.md
@@ -329,16 +329,16 @@ Also: image transforms that had been added to RPiPlay have been ported to UxPlay
|
||||
**-as 0** (or just **-a**) suppresses playing of streamed audio, but displays streamed video.
|
||||
|
||||
**-nc** maintains previous UxPlay < 1.45 behavior that does **not close** the video window when the the client
|
||||
sends the "Stop Mirroring" signal.
|
||||
|
||||
sends the "Stop Mirroring" signal. _This option is currently used by default in macOS,
|
||||
as the window created in macOS by GStreamer does not terminate correctly (it causes a segfault)
|
||||
if it is still open when the GStreamer pipeline is closed._
|
||||
|
||||
**-t _timeout_** will cause the server to relaunch (without stopping uxplay) if no connections
|
||||
have been present during the previous _timeout_ seconds. You may wish to use this if the Server
|
||||
is not visible to new Clients that were inactive when the Server was launched, and an idle Bonjour
|
||||
registration eventually becomes unavailable for new connections (this is a workaround for what
|
||||
may be due to a problem with your DNS-SD or Avahi setup). _This option should **not** be used on
|
||||
macOS, as a window created
|
||||
by GStreamer does not terminate correctly (it causes a segfault)
|
||||
if it is still open when the GStreamer pipeline is closed._
|
||||
may be due to a problem with your DNS-SD or Avahi setup). _This option is currently disabled in
|
||||
macOS, for the same reason that requires the -nc option_
|
||||
|
||||
# Troubleshooting
|
||||
|
||||
|
||||
11
README.txt
11
README.txt
@@ -418,7 +418,10 @@ displays streamed video.
|
||||
|
||||
**-nc** maintains previous UxPlay \< 1.45 behavior that does **not
|
||||
close** the video window when the the client sends the "Stop Mirroring"
|
||||
signal.
|
||||
signal. *This option is currently used by default in macOS, as the
|
||||
window created in macOS by GStreamer does not terminate correctly (it
|
||||
causes a segfault) if it is still open when the GStreamer pipeline is
|
||||
closed.*
|
||||
|
||||
**-t *timeout*** will cause the server to relaunch (without stopping
|
||||
uxplay) if no connections have been present during the previous
|
||||
@@ -426,10 +429,8 @@ uxplay) if no connections have been present during the previous
|
||||
to new Clients that were inactive when the Server was launched, and an
|
||||
idle Bonjour registration eventually becomes unavailable for new
|
||||
connections (this is a workaround for what may be due to a problem with
|
||||
your DNS-SD or Avahi setup). *This option should **not** be used on
|
||||
macOS, as a window created by GStreamer does not terminate correctly (it
|
||||
causes a segfault) if it is still open when the GStreamer pipeline is
|
||||
closed.*
|
||||
your DNS-SD or Avahi setup). *This option is currently disabled in
|
||||
macOS, for the same reason that requires the -nc option*
|
||||
|
||||
Troubleshooting
|
||||
===============
|
||||
|
||||
@@ -437,6 +437,13 @@ int main (int argc, char *argv[]) {
|
||||
use_audio = false;
|
||||
}
|
||||
|
||||
#if __APPLE__
|
||||
/* force use of -nc option on macOS */
|
||||
LOGI("macOS detected: use -nc option as workaround for GStreamer problem");
|
||||
previous_no_close_behavior = true;
|
||||
server_timeout = 0;
|
||||
#endif
|
||||
|
||||
if (videosink == "0") {
|
||||
use_video = false;
|
||||
videosink.erase();
|
||||
|
||||
Reference in New Issue
Block a user