From d47bb01cbaac427741c585a74c97d1080f9de184 Mon Sep 17 00:00:00 2001
From: "F. Duncanh"
Date: Fri, 9 Aug 2024 18:14:53 -0400
Subject: [PATCH] add -nofreeze option; prepare for UxPlay-1.69 release
---
README.html | 46 +++++++++++++++++++++++++++-------------------
README.md | 29 +++++++++++++++++++----------
README.txt | 44 ++++++++++++++++++++++++++------------------
uxplay.1 | 8 +++++---
uxplay.cpp | 13 +++++++++----
uxplay.spec | 4 ++--
6 files changed, 88 insertions(+), 56 deletions(-)
diff --git a/README.html b/README.html
index 44d79a4..7a0da6c 100644
--- a/README.html
+++ b/README.html
@@ -1,29 +1,27 @@
UxPlay
-1.68: AirPlay-Mirror and AirPlay-Audio server for Linux, macOS, and Unix
+id="uxplay-1.69-airplay-mirror-and-airplay-audio-server-for-linux-macos-and-unix-now-also-runs-on-windows.">UxPlay
+1.69: AirPlay-Mirror and AirPlay-Audio server for Linux, macOS, and Unix
(now also runs on Windows).
Now
+id="now-developed-at-the-github-site-httpsgithub.comfdh2uxplay-where-all-user-issues-should-be-posted-and-latest-versions-can-be-found.">Now
developed at the GitHub site https://github.com/FDH2/UxPlay
(where ALL user issues should be posted, and latest versions can be
-found).
+found).
-- NEW in v1.68: Volume-control improvements, plus
-improved support for Apple-style one-time “pin” codes introduced in
-1.67: a register of pin-registered clients can now optionally be
-maintained to check returning clients; a simpler method for generating a
-persistent public key (based on the MAC address, which can be set in the
-UxPlay startup file) is now the default. (The OpenSSL “pem-file” method
-introduced in 1.67 is still available with the “-key” option.)
+- NEW in v1.69: minor changes for users:
+-nofreeze option to NOT leave frozen video in place when a network
+failure occurs; internal changes/improvements needed for planned future
+HLS video streaming support.
Highlights:
- GPLv3, open source.
- Originally supported only AirPlay Mirror protocol, now has added
support for AirPlay Audio-only (Apple Lossless ALAC) streaming from
-current iOS/iPadOS clients. There is no support for Airplay2
-video-streaming protocol, and none is planned.
+current iOS/iPadOS clients. There is no current support for
+Airplay HLS video-streaming (e.g., YouTube video) but this is in
+development.
- macOS computers (2011 or later, both Intel and “Apple Silicon” M1/M2
systems) can act either as AirPlay clients, or as the server running
UxPlay. Using AirPlay, UxPlay can emulate a second display for macOS
@@ -166,12 +164,13 @@ app cannot be watched using UxPlay’s AirPlay Mirror mode (only the
unprotected audio will be streamed, in AAC format), but both video and
audio content from DRM-free apps like “YouTube app” will be streamed by
UxPlay in Mirror mode.
-As UxPlay does not support non-Mirror AirPlay2 video
-streaming (where the client controls a web server on the AirPlay server
-that directly receives content to avoid it being decoded and re-encoded
-by the client), using the icon for AirPlay video in apps such as the
-YouTube app will only send audio (in lossless ALAC format) without the
-accompanying video.
+As UxPlay does not currently support non-Mirror AirPlay
+video streaming (where the client controls a web server on the AirPlay
+server that directly receives HLS content to avoid it being decoded and
+re-encoded by the client), using the icon for AirPlay video in apps such
+as the YouTube app will only send audio (in lossless ALAC format)
+without the accompanying video (there are plans to support HLS video in
+future releases of UxPlay)
Possibility
@@ -1099,6 +1098,10 @@ present, and synchronize with it). After n failures, the client
will be presumed to be offline, and the connection will be reset to
allow a new connection. The default value of n is 5; the value
n = 0 means “no limit” on timeouts.
+
-nofreeze closes the video window after a reset due
+to ntp timeout (default is to leave window open to allow a smoother
+reconection to the same client). This option may be useful in fullscreen
+mode.
-nc maintains previous UxPlay < 1.45 behavior
that does not close the video window when the the
client sends the “Stop Mirroring” signal. This option is currently
@@ -1529,6 +1532,11 @@ an AppleTV6,2 with sourceVersion 380.20.1 (an AppleTV 4K 1st gen,
introduced 2017, running tvOS 12.2.1), so it does not seem to matter
what version UxPlay claims to be.
Changelog
+1.69 2024-08-09 Internal improvements (e.g. in -nohold option,
+identifying GStreamer videosink selected by autovideosink, finding X11
+display) in anticipation of future HLS video support. New -nofreeze
+option to not leave frozen video in place when a network connection is
+reset. Fixes for GStreamer-1.24.x changes.
1.68 2023-12-31 New simpler (default) method for generating a
persistent public key from the server MAC address (which can now be set
with the -m option). (The previous method is still available with -key
diff --git a/README.md b/README.md
index 081aa49..61957f8 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,10 @@
-# UxPlay 1.68: AirPlay-Mirror and AirPlay-Audio server for Linux, macOS, and Unix (now also runs on Windows).
+# UxPlay 1.69: AirPlay-Mirror and AirPlay-Audio server for Linux, macOS, and Unix (now also runs on Windows).
-### Now developed at the GitHub site [https://github.com/FDH2/UxPlay](https://github.com/FDH2/UxPlay) (where ALL user issues should be posted, and latest versions can be found).
+### **Now developed at the GitHub site [https://github.com/FDH2/UxPlay](https://github.com/FDH2/UxPlay) (where ALL user issues should be posted, and latest versions can be found).**
- * _**NEW in v1.68**: Volume-control improvements, plus improved support for Apple-style one-time "pin" codes introduced in 1.67: a
- register of pin-registered clients can now optionally be maintained to check returning clients; a simpler method for generating
- a persistent public key (based on the MAC address, which can be set in the UxPlay startup file) is now the default. (The OpenSSL
- "pem-file" method introduced in 1.67 is still available with the "-key" option.)_
+ * _**NEW in v1.69**: minor changes for users: -nofreeze option to NOT leave frozen
+ video in place when a network failure occurs; internal changes/improvements
+ needed for planned future HLS video streaming support._
## Highlights:
@@ -13,7 +12,8 @@
* GPLv3, open source.
* Originally supported only AirPlay Mirror protocol, now has added support
for AirPlay Audio-only (Apple Lossless ALAC) streaming
- from current iOS/iPadOS clients. **There is no support for Airplay2 video-streaming protocol, and none is planned.**
+ from current iOS/iPadOS clients. **There is no current support for Airplay HLS
+ video-streaming (e.g., YouTube video) but this is in development.**
* macOS computers (2011 or later, both Intel and "Apple Silicon" M1/M2
systems) can act either as AirPlay clients, or
as the server running UxPlay. Using AirPlay, UxPlay can
@@ -125,11 +125,12 @@ switch back by initiating a_ **Mirror** _mode connection; cover-art display stop
the Apple TV app cannot be watched using UxPlay's AirPlay Mirror mode (only the unprotected audio will be streamed, in AAC format),
but both video and audio content from DRM-free apps like "YouTube app" will be streamed by UxPlay in Mirror mode.**
-* **As UxPlay does not support non-Mirror AirPlay2 video streaming (where the
+* **As UxPlay does not currently support non-Mirror AirPlay video streaming (where the
client controls a web server on the AirPlay server that directly receives
-content to avoid it being decoded and re-encoded by the client),
+HLS content to avoid it being decoded and re-encoded by the client),
using the icon for AirPlay video in apps such as the YouTube app
-will only send audio (in lossless ALAC format) without the accompanying video.**
+will only send audio (in lossless ALAC format) without the accompanying
+video (there are plans to support HLS video in future releases of UxPlay)**
### Possibility for using hardware-accelerated h264 video-decoding, if available.
@@ -875,6 +876,9 @@ which will not work if a firewall is running.
_n_ failures, the client will be presumed to be offline, and the connection will be reset to allow a new
connection. The default value of _n_ is 5; the value _n_ = 0 means "no limit" on timeouts.
+**-nofreeze** closes the video window after a reset due to ntp timeout (default is to leave window
+ open to allow a smoother reconection to the same client). This option may be useful in fullscreen mode.
+
**-nc** maintains previous UxPlay < 1.45 behavior that does **not close** the video window when the the client
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)
@@ -1205,6 +1209,11 @@ tvOS 12.2.1), so it does not seem to matter what version UxPlay claims to be.
# Changelog
+1.69 2024-08-09 Internal improvements (e.g. in -nohold option, identifying GStreamer videosink
+ selected by autovideosink, finding X11 display) in anticipation of future HLS video support.
+ New -nofreeze option to not leave frozen video in place when a network connection is reset.
+ Fixes for GStreamer-1.24.x changes.
+
1.68 2023-12-31 New simpler (default) method for generating a persistent public key from the server MAC
address (which can now be set with the -m option). (The previous method is still available
with -key option). New option -reg to maintain a register of pin-authenticated clients. Corrected
diff --git a/README.txt b/README.txt
index 7d432e6..e630f5a 100644
--- a/README.txt
+++ b/README.txt
@@ -1,23 +1,20 @@
-# UxPlay 1.68: AirPlay-Mirror and AirPlay-Audio server for Linux, macOS, and Unix (now also runs on Windows).
+# UxPlay 1.69: AirPlay-Mirror and AirPlay-Audio server for Linux, macOS, and Unix (now also runs on Windows).
-### Now developed at the GitHub site (where ALL user issues should be posted, and latest versions can be found).
+### **Now developed at the GitHub site (where ALL user issues should be posted, and latest versions can be found).**
-- ***NEW in v1.68**: Volume-control improvements, plus improved
- support for Apple-style one-time "pin" codes introduced in 1.67: a
- register of pin-registered clients can now optionally be maintained
- to check returning clients; a simpler method for generating a
- persistent public key (based on the MAC address, which can be set in
- the UxPlay startup file) is now the default. (The OpenSSL "pem-file"
- method introduced in 1.67 is still available with the "-key"
- option.)*
+- ***NEW in v1.69**: minor changes for users: -nofreeze option to NOT
+ leave frozen video in place when a network failure occurs; internal
+ changes/improvements needed for planned future HLS video streaming
+ support.*
## Highlights:
- GPLv3, open source.
- Originally supported only AirPlay Mirror protocol, now has added
support for AirPlay Audio-only (Apple Lossless ALAC) streaming from
- current iOS/iPadOS clients. **There is no support for Airplay2
- video-streaming protocol, and none is planned.**
+ current iOS/iPadOS clients. **There is no current support for
+ Airplay HLS video-streaming (e.g., YouTube video) but this is in
+ development.**
- macOS computers (2011 or later, both Intel and "Apple Silicon" M1/M2
systems) can act either as AirPlay clients, or as the server running
UxPlay. Using AirPlay, UxPlay can emulate a second display for macOS
@@ -158,12 +155,13 @@ stops/restarts as you leave/re-enter* **Audio** *mode.*
and audio content from DRM-free apps like "YouTube app" will be
streamed by UxPlay in Mirror mode.**
-- **As UxPlay does not support non-Mirror AirPlay2 video streaming
- (where the client controls a web server on the AirPlay server that
- directly receives content to avoid it being decoded and re-encoded
- by the client), using the icon for AirPlay video in apps such as the
- YouTube app will only send audio (in lossless ALAC format) without
- the accompanying video.**
+- **As UxPlay does not currently support non-Mirror AirPlay video
+ streaming (where the client controls a web server on the AirPlay
+ server that directly receives HLS content to avoid it being decoded
+ and re-encoded by the client), using the icon for AirPlay video in
+ apps such as the YouTube app will only send audio (in lossless ALAC
+ format) without the accompanying video (there are plans to support
+ HLS video in future releases of UxPlay)**
### Possibility for using hardware-accelerated h264 video-decoding, if available.
@@ -1117,6 +1115,10 @@ it). After *n* failures, the client will be presumed to be offline, and
the connection will be reset to allow a new connection. The default
value of *n* is 5; the value *n* = 0 means "no limit" on timeouts.
+**-nofreeze** closes the video window after a reset due to ntp timeout
+(default is to leave window open to allow a smoother reconection to the
+same client). This option may be useful in fullscreen mode.
+
**-nc** maintains previous UxPlay \< 1.45 behavior that does **not
close** the video window when the the client sends the "Stop Mirroring"
signal. *This option is currently used by default in macOS, as the
@@ -1570,6 +1572,12 @@ what version UxPlay claims to be.
# Changelog
+1.69 2024-08-09 Internal improvements (e.g. in -nohold option,
+identifying GStreamer videosink selected by autovideosink, finding X11
+display) in anticipation of future HLS video support. New -nofreeze
+option to not leave frozen video in place when a network connection is
+reset. Fixes for GStreamer-1.24.x changes.
+
1.68 2023-12-31 New simpler (default) method for generating a persistent
public key from the server MAC address (which can now be set with the -m
option). (The previous method is still available with -key option). New
diff --git a/uxplay.1 b/uxplay.1
index 568ff65..d68fcdf 100644
--- a/uxplay.1
+++ b/uxplay.1
@@ -1,11 +1,11 @@
-.TH UXPLAY "1" "December 2023" "1.68" "User Commands"
+.TH UXPLAY "1" "August 2024" "1.69" "User Commands"
.SH NAME
uxplay \- start AirPlay server
.SH SYNOPSIS
.B uxplay
[\fI\,-n name\/\fR] [\fI\,-s wxh\/\fR] [\fI\,-p \/\fR[\fI\,n\/\fR]] [more \fI OPTIONS \/\fR ...]
.SH DESCRIPTION
-UxPlay 1.68: An open\-source AirPlay mirroring (+ audio streaming) server:
+UxPlay 1.69: An open\-source AirPlay mirroring (+ audio streaming) server:
.SH OPTIONS
.TP
.B
@@ -95,7 +95,9 @@ UxPlay 1.68: An open\-source AirPlay mirroring (+ audio streaming) server:
.TP
\fB\-reset\fR n Reset after 3n seconds client silence (default 5, 0=never).
.TP
-\fB\-nc\fR Do not close video window when client stops mirroring
+\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
.TP
\fB\-nohold\fR Drop current connection when new client connects.
.TP
diff --git a/uxplay.cpp b/uxplay.cpp
index ddf7af9..c4676e3 100644
--- a/uxplay.cpp
+++ b/uxplay.cpp
@@ -62,7 +62,7 @@
#include "renderers/video_renderer.h"
#include "renderers/audio_renderer.h"
-#define VERSION "1.68"
+#define VERSION "1.69"
#define SECOND_IN_USECS 1000000
#define SECOND_IN_NSECS 1000000000UL
@@ -122,6 +122,7 @@ static bool debug_log = DEFAULT_DEBUG_LOG;
static int log_level = LOGGER_INFO;
static bool bt709_fix = false;
static int nohold = 0;
+static bool nofreeze = false;
static unsigned short raop_port;
static unsigned short airplay_port;
static uint64_t remote_clock_offset = 0;
@@ -609,7 +610,8 @@ static void print_info (char *name) {
printf("-al x Audio latency in seconds (default 0.25) reported to client.\n");
printf("-ca In Airplay Audio (ALAC) mode, write cover-art to file \n");
printf("-reset n Reset after 3n seconds client silence (default %d, 0=never)\n", NTP_TIMEOUT_LIMIT);
- printf("-nc do Not Close video window when client stops mirroring\n");
+ 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("-nohold Drop current connection when new client connects.\n");
printf("-restrict Restrict clients to those specified by \"-allow \"\n");
printf(" UxPlay displays deviceID when a client attempts to connect\n");
@@ -1125,6 +1127,8 @@ static void parse_arguments (int argc, char *argv[]) {
db_low = db1;
db_high = db2;
printf("db range %f:%f\n", db_low, db_high);
+ } else if (arg == "-nofreeze") {
+ nofreeze = true;
} else {
fprintf(stderr, "unknown option %s, stopping (for help use option \"-h\")\n",argv[i]);
exit(1);
@@ -1510,8 +1514,9 @@ extern "C" void conn_reset (void *cls, int timeouts, bool reset_video) {
LOGI(" Sometimes the network connection may recover after a longer delay:\n"
" the default timeout limit n = %d can be changed with the \"-reset n\" option", NTP_TIMEOUT_LIMIT);
}
- printf("reset_video %d\n",(int) reset_video);
- close_window = reset_video; /* leave "frozen" window open if reset_video is false */
+ if (!nofreeze) {
+ close_window = reset_video; /* leave "frozen" window open if reset_video is false */
+ }
raop_stop(raop);
reset_loop = true;
}
diff --git a/uxplay.spec b/uxplay.spec
index b92fcb1..07157a7 100644
--- a/uxplay.spec
+++ b/uxplay.spec
@@ -1,5 +1,5 @@
Name: uxplay
-Version: 1.68.3
+Version: 1.69
Release: 1%{?dist}
%global gittag v%{version}
@@ -135,7 +135,7 @@ cd build
%{_docdir}/%{name}/llhttp/LICENSE-MIT
%changelog
-* Fri Dec 29 2023 UxPlay maintainer
+* Fri Aug 09 2024 UxPlay maintainer
Initial uxplay.spec: tested on Fedora 38, Rocky Linux 9.2, OpenSUSE
Leap 15.5, Mageia 9, OpenMandriva ROME, PCLinuxOS
-