Merge pull request #111 from FDH2/master

ignore ZOOMFIX request if GStreamer >= 1.20
This commit is contained in:
antimof
2022-10-17 21:23:15 +03:00
committed by GitHub
10 changed files with 111 additions and 71 deletions

View File

@@ -9,7 +9,6 @@ include(GNUInstallDirs)
set ( CMAKE_CXX_STANDARD 11 )
if ( ZOOMFIX )
add_definitions( -DX_DISPLAY_FIX )
find_package( X11 REQUIRED )
link_libraries( ${X11_LIBRARIES} )
include_directories( ${X11_INCLUDE_DIR} )

View File

@@ -1,6 +1,6 @@
<h1
id="uxplay-1.56-airplay-mirror-and-airplay-audio-server-for-linux-macos-and-unix-now-also-runs-on-windows.">UxPlay
1.56: AirPlay-Mirror and AirPlay-Audio server for Linux, macOS, and Unix
id="uxplay-1.57-airplay-mirror-and-airplay-audio-server-for-linux-macos-and-unix-now-also-runs-on-windows.">UxPlay
1.57: AirPlay-Mirror and AirPlay-Audio server for Linux, macOS, and Unix
(now also runs on Windows).</h1>
<h3
id="now-developed-at-the-github-site-httpsgithub.comfdh2uxplay-where-all-user-issues-should-be-posted.">Now
@@ -56,12 +56,12 @@ antimof site is no longer involved in development, but periodically
posts updates pulled from the new main <a
href="https://github.com/FDH2/UxPlay">UxPlay site</a>).</p>
<p>UxPlay is tested on a number of systems, including (among others)
Debian 10.11 “Buster” and 11.2 “Bullseye”, Ubuntu 20.04 and 22.04, Linux
Mint 20.3, Pop!_OS 22.04 (NVIDIA edition), Rocky Linux 8.6 (a CentOS
successor), OpenSUSE 15.4, Arch Linux 5.16.8, macOS 12.3 (Intel and M1),
FreeBSD 13.1. On Raspberry Pi, it is tested on Raspberry Pi OS
(Bullseye) (32- and 64-bit), Ubuntu 22.04, and Manjaro RPi4 22.04. Also
tested on 64-bit Windows 10 and 11.</p>
Debian 10.11 “Buster” and 11.2 “Bullseye”, Ubuntu 20.04 LTS and 22.04.1
LTS, Linux Mint 20.3, Pop!_OS 22.04 (NVIDIA edition), Rocky Linux 8.6 (a
CentOS successor), OpenSUSE 15.4, Arch Linux 22.10, macOS 12.3 (Intel
and M1), FreeBSD 13.1. On Raspberry Pi, it is tested on Raspberry Pi OS
(Bullseye) (32- and 64-bit), Ubuntu 22.04.1, and Manjaro RPi4 22.10.
Also tested on 64-bit Windows 10 and 11.</p>
<p>Its main use is to act like an AppleTV for screen-mirroring (with
audio) of iOS/iPadOS/macOS clients (iPhone, iPod Touch, iPad, Mac
computers) in a window on the server display (with the possibility of
@@ -178,8 +178,10 @@ will be included in the next Debian release “Bookworm” (currently in
“testing” phase) and Ubuntu-22.04 already provides a uxplay-1.46 package
based on this. Arch-based distributions also have AUR self-building
packages for both the latest UxPlay release and the current GitHub
version. To build the latest version yourself, follow the instructions
below.</li>
version. (If you install a uxplay package, you may also need to install
some needed GStreamer plugin packages which might not get installed as
“requirements” : see below.) To build the latest version yourself,
follow the instructions below.</li>
</ul>
<p>Either download and unzip <a
href="https://github.com/FDH2/UxPlay/archive/refs/heads/master.zip">UxPlay-master.zip</a>,
@@ -232,7 +234,9 @@ development libraries to be installed: on Debian-based systems do this
with “<code>sudo apt-get install libx11-dev</code>” . “ZOOMFIX” is not
needed on macOS, or if you are using non-X11 windows (such as OpenGL) on
Linux. See <a href="#zoomfix-compile-time-option">ZOOMFIX compile-time
option</a> below for more information, and alternatives to “ZOOMFIX”</p>
option</a> below for more information, and alternatives to “ZOOMFIX”.
<strong>ZOOMFIX will NOT be applied if GStreamer &gt;= 1.20 is
found.</strong></p>
<ol type="1">
<li><code>sudo apt-get install libssl-dev libplist-dev</code>“. (unless
you need to build OpenSSL and libplist from source).</li>
@@ -242,7 +246,7 @@ modify the source, replace this by
<code>mkdir build; cd build; cmake ..</code>”: you can then delete the
<code>build</code> directory if needed, without affecting the source.)
Also add any cmake “<code>-D</code>” options here as needed (e.g,
ZOOMFIX=ON or NO_MARCH_NATIVE=ON).</li>
<code>-DZOOMFIX=ON</code> or <code>-DNO_MARCH_NATIVE=ON</code>).</li>
<li><code>make</code></li>
<li><code>sudo make install</code> (you can afterwards uninstall with
<code>sudo make uninstall</code> in the same directory in which this was
@@ -319,7 +323,7 @@ href="https://github.com/FDH2/UxPlay/wiki/Gstreamer-Video4Linux2-plugin-patches"
with instructions in the UxPlay Wiki</a>.</p></li>
</ul>
<p>The basic uxplay options for R Pi are
<code>uxplay -v4l2 [-vs &lt;videosink&gt;]</code>. The choice
<code>uxplay [-v4l2] [-vs &lt;videosink&gt;]</code>. The choice
<code>&lt;videosink&gt;</code> = <code>glimagesink</code> is sometimes
useful. On a system without X11 (like R Pi OS Lite) with framebuffer
video, use <code>&lt;videosink&gt;</code> = <code>kmssink</code>. With
@@ -566,8 +570,8 @@ used.</p>
ability to toggle into and out of fullscreen mode using the Alt-Enter
key combination with option
<code>-vs "d3d11videosink fullscreen-toggle-mode=alt-enter"</code>. For
convenience, this option will always be set if
<code>-vs d3d11videosink</code> is used.</p>
convenience, this option will be added if just
<code>-vs d3d11videosink</code> (by itself) is used.</p>
<p>The executable uxplay.exe can also be run without the MSYS2
environment, in the Windows Terminal, with
<code>C:\msys64\mingw64\bin\uxplay</code>.</p>
@@ -658,7 +662,7 @@ digital TV. This is no longer needed by GStreamer-1.20.4 and backports
from it.</p>
<p><strong>-rpi</strong> Equivalent to “-v4l2”. Use for “Desktop”
Raspberry Pi systems with X11.</p>
<p><strong>-rpigl</strong> Equivalent to “-v4l2 -vs glimagesink”.
<p><strong>-rpigl</strong> Equivalent to “-rpi -vs glimagesink”.
Sometimes better for “Desktop” Raspberry Pi systems with X11.</p>
<p><strong>-rpifb</strong> Equivalent to “-rpi -vs kmssink” (use for
Raspberry Pi systems using the framebuffer, like RPi OS Bullseye
@@ -958,6 +962,11 @@ as “SupportsLegacyPairing”) of the “features” plist code (reported to
the client by the AirPlay server) to be set. The “features” code and
other settings are set in <code>UxPlay/lib/dnssdint.h</code>.</p>
<h1 id="changelog">Changelog</h1>
<p>1.57 2022-10-09 Minor fixes: (fix coredump on AUR on “stop
mirroring”, occurs when compiled with AUR CFLAGS -DFORTIFY_SOURCE);
graceful exit when required plugins are missing; improved support for
builds on Windows. Include audioresample in GStreamer audio
pipeline.</p>
<p>1.56 2022-09-01 Added support for building and running UxPlay-1.56 on
Windows (no changes to Unix (Linux, *BSD, macOS) codebase.)</p>
<p>1.56 2022-07-30 Remove -bt709 from -rpi, -rpiwl, -rpifb as GStreamer

View File

@@ -1,4 +1,4 @@
# UxPlay 1.56: AirPlay-Mirror and AirPlay-Audio server for Linux, macOS, and Unix (now also runs on Windows).
# UxPlay 1.57: 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).
@@ -44,9 +44,9 @@ development, but periodically posts updates pulled from the new
main [UxPlay site](https://github.com/FDH2/UxPlay)).
UxPlay is tested on a number of systems, including (among others) Debian 10.11 "Buster" and 11.2 "Bullseye",
Ubuntu 20.04 and 22.04, Linux Mint 20.3, Pop!\_OS 22.04 (NVIDIA edition), Rocky Linux 8.6 (a CentOS successor),
OpenSUSE 15.4, Arch Linux 5.16.8, macOS 12.3 (Intel and M1), FreeBSD 13.1.
On Raspberry Pi, it is tested on Raspberry Pi OS (Bullseye) (32- and 64-bit), Ubuntu 22.04, and Manjaro RPi4 22.04.
Ubuntu 20.04 LTS and 22.04.1 LTS, Linux Mint 20.3, Pop!\_OS 22.04 (NVIDIA edition), Rocky Linux 8.6 (a CentOS successor),
OpenSUSE 15.4, Arch Linux 22.10, macOS 12.3 (Intel and M1), FreeBSD 13.1.
On Raspberry Pi, it is tested on Raspberry Pi OS (Bullseye) (32- and 64-bit), Ubuntu 22.04.1, and Manjaro RPi4 22.10.
Also tested on 64-bit Windows 10 and 11.
Its main use is to act like an AppleTV for screen-mirroring (with audio) of iOS/iPadOS/macOS clients
@@ -143,14 +143,17 @@ UxPlay's GPLv3 license does not have an added
"exception" explicitly allowing it to be distributed in compiled form when linked to OpenSSL versions
**prior to v. 3.0.0** (older versions of OpenSSL have a license clause incompatible with the GPL unless
OpenSSL can be regarded as a "System Library", which it is in *BSD). Many Linux distributions treat OpenSSL
as a "System Library", but some (e.g. Debian) do not: in this case, the issue is solved by linking with OpenSSL-3.0.0 or later.
as a "System Library", but some (e.g. Debian) do not: in this case, the issue is solved by linking
with OpenSSL-3.0.0 or later.
# Getting UxPlay:
* Your distribution may already provide a pre-built uxplay package. It will be included in the next Debian release "Bookworm"
(currently in "testing" phase) and Ubuntu-22.04 already provides a uxplay-1.46 package based on this. Arch-based distributions also
have AUR self-building packages for both the latest UxPlay release and the current GitHub version.
To build the latest version yourself, follow the instructions below.
* Your distribution may already provide a pre-built uxplay package. It will be included in the
next Debian release "Bookworm" (currently in "testing" phase) and Ubuntu-22.04 already provides a uxplay-1.46
package based on this. Arch-based distributions also have AUR self-building packages for both the latest UxPlay
release and the current GitHub version. (If you install a uxplay package, you may also need to install
some needed GStreamer plugin packages which might not get installed as "requirements" : see below.) To build
the latest version yourself, follow the instructions below.
Either download and unzip [UxPlay-master.zip](https://github.com/FDH2/UxPlay/archive/refs/heads/master.zip),
or (if git is installed): "git clone https://github.com/FDH2/UxPlay". You
@@ -197,7 +200,7 @@ as Zoom, you should use the cmake option "` -DZOOMFIX=ON`" in step 3. This requ
the X11 development libraries to be installed: on Debian-based systems do this with "`sudo apt-get install libx11-dev`" .
"ZOOMFIX" is not needed on macOS, or if you are using non-X11 windows
(such as OpenGL) on Linux. See [ZOOMFIX compile-time option](#zoomfix-compile-time-option) below for more information,
and alternatives to "ZOOMFIX"
and alternatives to "ZOOMFIX". **ZOOMFIX will NOT be applied if GStreamer >= 1.20 is found.**
1. `sudo apt-get install libssl-dev libplist-dev`".
(unless you need to build OpenSSL and libplist from source).
@@ -205,7 +208,7 @@ and alternatives to "ZOOMFIX"
3. `cmake .` (For a cleaner build, which is useful if you modify the source, replace this
by "``mkdir build; cd build; cmake ..``": you can then delete the
`build` directory if needed, without affecting the source.) Also add any cmake "`-D`" options
here as needed (e.g, ZOOMFIX=ON or NO_MARCH_NATIVE=ON).
here as needed (e.g, `-DZOOMFIX=ON` or ``-DNO_MARCH_NATIVE=ON``).
4. `make`
5. `sudo make install` (you can afterwards uninstall with ``sudo make uninstall``
in the same directory in which this was run).
@@ -270,7 +273,7 @@ You can also test UxPlay with software-only video decoding using option `-avdec`
improvements from GStreamer-1.22. Raspberry Pi OS (Bullseye) now has the needed backports. For other distributions, patches for GStreamer
are [available with instructions in the UxPlay Wiki](https://github.com/FDH2/UxPlay/wiki/Gstreamer-Video4Linux2-plugin-patches).
The basic uxplay options for R Pi are ```uxplay -v4l2 [-vs <videosink>]```. The
The basic uxplay options for R Pi are ```uxplay [-v4l2] [-vs <videosink>]```. The
choice `<videosink>` = ``glimagesink`` is sometimes useful.
On a system without X11 (like R Pi OS Lite) with framebuffer video, use `<videosink>` = ``kmssink``.
With the Wayland video compositor, use `<videosink>` = ``waylandsink``. For convenience,
@@ -474,7 +477,7 @@ default audio device is used.
If you wish to specify the videosink using the `-vs <videosink>` option, some choices for `<videosink>` are
`d3d11videosink`, ``d3dvideosink``, ```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.
option `-vs "d3d11videosink fullscreen-toggle-mode=alt-enter"`. For convenience, this option will be added if just ``-vs d3d11videosink`` (by itself) is used.
The executable uxplay.exe can also be run without the MSYS2 environment, in
the Windows Terminal, with `C:\msys64\mingw64\bin\uxplay`.
@@ -562,7 +565,7 @@ which will not work if a firewall is running.
**-rpi** Equivalent to "-v4l2 ". Use for "Desktop" Raspberry Pi systems with X11.
**-rpigl** Equivalent to "-v4l2 -vs glimagesink". Sometimes better for "Desktop" Raspberry Pi systems with X11.
**-rpigl** Equivalent to "-rpi -vs glimagesink". Sometimes better for "Desktop" Raspberry Pi systems with X11.
**-rpifb** Equivalent to "-rpi -vs kmssink" (use for Raspberry Pi systems
using the framebuffer, like RPi OS Bullseye Lite).
@@ -806,6 +809,11 @@ tvOS 12.2.1); it seems that the use of "legacy" protocol just requires bit 27 (l
The "features" code and other settings are set in `UxPlay/lib/dnssdint.h`.
# Changelog
1.57 2022-10-09 Minor fixes: (fix coredump on AUR on "stop mirroring", occurs when compiled with
AUR CFLAGS -DFORTIFY_SOURCE); graceful exit when required plugins are missing;
improved support for builds on Windows. Include audioresample in GStreamer
audio pipeline.
1.56 2022-09-01 Added support for building and running UxPlay-1.56 on Windows (no changes
to Unix (Linux, *BSD, macOS) codebase.)

View File

@@ -1,4 +1,4 @@
# UxPlay 1.56: AirPlay-Mirror and AirPlay-Audio server for Linux, macOS, and Unix (now also runs on Windows).
# UxPlay 1.57: 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> (where all user issues should be posted).
@@ -54,12 +54,12 @@ is no longer involved in development, but periodically posts updates
pulled from the new main [UxPlay site](https://github.com/FDH2/UxPlay)).
UxPlay is tested on a number of systems, including (among others) Debian
10.11 "Buster" and 11.2 "Bullseye", Ubuntu 20.04 and 22.04, Linux Mint
20.3, Pop!\_OS 22.04 (NVIDIA edition), Rocky Linux 8.6 (a CentOS
successor), OpenSUSE 15.4, Arch Linux 5.16.8, macOS 12.3 (Intel and M1),
FreeBSD 13.1. On Raspberry Pi, it is tested on Raspberry Pi OS
(Bullseye) (32- and 64-bit), Ubuntu 22.04, and Manjaro RPi4 22.04. Also
tested on 64-bit Windows 10 and 11.
10.11 "Buster" and 11.2 "Bullseye", Ubuntu 20.04 LTS and 22.04.1 LTS,
Linux Mint 20.3, Pop!\_OS 22.04 (NVIDIA edition), Rocky Linux 8.6 (a
CentOS successor), OpenSUSE 15.4, Arch Linux 22.10, macOS 12.3 (Intel
and M1), FreeBSD 13.1. On Raspberry Pi, it is tested on Raspberry Pi OS
(Bullseye) (32- and 64-bit), Ubuntu 22.04.1, and Manjaro RPi4 22.10.
Also tested on 64-bit Windows 10 and 11.
Its main use is to act like an AppleTV for screen-mirroring (with audio)
of iOS/iPadOS/macOS clients (iPhone, iPod Touch, iPad, Mac computers) in
@@ -178,8 +178,10 @@ case, the issue is solved by linking with OpenSSL-3.0.0 or later.
"testing" phase) and Ubuntu-22.04 already provides a uxplay-1.46
package based on this. Arch-based distributions also have AUR
self-building packages for both the latest UxPlay release and the
current GitHub version. To build the latest version yourself, follow
the instructions below.
current GitHub version. (If you install a uxplay package, you may
also need to install some needed GStreamer plugin packages which
might not get installed as "requirements" : see below.) To build the
latest version yourself, follow the instructions below.
Either download and unzip
[UxPlay-master.zip](https://github.com/FDH2/UxPlay/archive/refs/heads/master.zip),
@@ -236,7 +238,8 @@ libraries to be installed: on Debian-based systems do this with
"`sudo apt-get install libx11-dev`" . "ZOOMFIX" is not needed on macOS,
or if you are using non-X11 windows (such as OpenGL) on Linux. See
[ZOOMFIX compile-time option](#zoomfix-compile-time-option) below for
more information, and alternatives to "ZOOMFIX"
more information, and alternatives to "ZOOMFIX". **ZOOMFIX will NOT be
applied if GStreamer \>= 1.20 is found.**
1. `sudo apt-get install libssl-dev libplist-dev`". (unless you need to
build OpenSSL and libplist from source).
@@ -245,7 +248,7 @@ more information, and alternatives to "ZOOMFIX"
source, replace this by "`mkdir build; cd build; cmake ..`": you can
then delete the `build` directory if needed, without affecting the
source.) Also add any cmake "`-D`" options here as needed (e.g,
ZOOMFIX=ON or NO_MARCH_NATIVE=ON).
`-DZOOMFIX=ON` or `-DNO_MARCH_NATIVE=ON`).
4. `make`
5. `sudo make install` (you can afterwards uninstall with
`sudo make uninstall` in the same directory in which this was run).
@@ -319,16 +322,17 @@ options.
GStreamer are [available with instructions in the UxPlay
Wiki](https://github.com/FDH2/UxPlay/wiki/Gstreamer-Video4Linux2-plugin-patches).
The basic uxplay options for R Pi are `uxplay -v4l2 [-vs <videosink>]`.
The choice `<videosink>` = `glimagesink` is sometimes useful. On a
system without X11 (like R Pi OS Lite) with framebuffer video, use
`<videosink>` = `kmssink`. With the Wayland video compositor, use
`<videosink>` = `waylandsink`. For convenience, these options are also
available combined in options `-rpi`, `-rpigl` `-rpifb`, `-rpiwl`,
respectively provided for X11, X11 with OpenGL, framebuffer, and Wayland
systems. You may find that just "`uxplay`", (*without* `-v4l2` or
`-rpi*` options, which lets GStreamer try to find the best video
solution by itself) provides the best results.
The basic uxplay options for R Pi are
`uxplay [-v4l2] [-vs <videosink>]`. The choice `<videosink>` =
`glimagesink` is sometimes useful. On a system without X11 (like R Pi OS
Lite) with framebuffer video, use `<videosink>` = `kmssink`. With the
Wayland video compositor, use `<videosink>` = `waylandsink`. For
convenience, these options are also available combined in options
`-rpi`, `-rpigl` `-rpifb`, `-rpiwl`, respectively provided for X11, X11
with OpenGL, framebuffer, and Wayland systems. You may find that just
"`uxplay`", (*without* `-v4l2` or `-rpi*` options, which lets GStreamer
try to find the best video solution by itself) provides the best
results.
- **For UxPlay-1.56 and later, if you are not using the latest
GStreamer patches from the Wiki, you will need to use the UxPlay
@@ -576,8 +580,8 @@ some choices for `<videosink>` are `d3d11videosink`, `d3dvideosink`,
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.
convenience, this option will be added if just `-vs d3d11videosink` (by
itself) is used.
The executable uxplay.exe can also be run without the MSYS2 environment,
in the Windows Terminal, with `C:\msys64\mingw64\bin\uxplay`.
@@ -680,7 +684,7 @@ longer needed by GStreamer-1.20.4 and backports from it.
**-rpi** Equivalent to "-v4l2". Use for "Desktop" Raspberry Pi systems
with X11.
**-rpigl** Equivalent to "-v4l2 -vs glimagesink". Sometimes better for
**-rpigl** Equivalent to "-rpi -vs glimagesink". Sometimes better for
"Desktop" Raspberry Pi systems with X11.
**-rpifb** Equivalent to "-rpi -vs kmssink" (use for Raspberry Pi
@@ -1000,6 +1004,11 @@ other settings are set in `UxPlay/lib/dnssdint.h`.
# Changelog
1.57 2022-10-09 Minor fixes: (fix coredump on AUR on "stop mirroring",
occurs when compiled with AUR CFLAGS -DFORTIFY_SOURCE); graceful exit
when required plugins are missing; improved support for builds on
Windows. Include audioresample in GStreamer audio pipeline.
1.56 2022-09-01 Added support for building and running UxPlay-1.56 on
Windows (no changes to Unix (Linux, \*BSD, macOS) codebase.)

View File

@@ -242,7 +242,9 @@ raop_rtp_mirror_thread(void *arg)
break;
}
if (stream_fd == -1 && FD_ISSET(raop_rtp_mirror->mirror_data_sock, &rfds)) {
if (stream_fd == -1 &&
(raop_rtp_mirror && raop_rtp_mirror->mirror_data_sock >= 0) &&
FD_ISSET(raop_rtp_mirror->mirror_data_sock, &rfds)) {
struct sockaddr_storage saddr;
socklen_t saddrlen;
logger_log(raop_rtp_mirror->logger, LOGGER_DEBUG, "raop_rtp_mirror accepting client");

View File

@@ -10,7 +10,17 @@ if (APPLE )
endif()
find_package( PkgConfig REQUIRED )
pkg_check_modules(GST REQUIRED gstreamer-1.0>=1.4
if (ZOOMFIX)
pkg_check_modules (GST120 gstreamer-1.0>=1.20)
if ( GST120_FOUND )
message( "-- Requested ZOOMFIX will NOT be applied as Gstreamer version is >= 1.20" )
else()
message( "-- Requested ZOOMFIX will be applied as Gstreamer version is < 1.20" )
add_definitions( -DX_DISPLAY_FIX )
endif()
endif()
pkg_check_modules(GST REQUIRED gstreamer-1.0>=1.4
gstreamer-sdp-1.0>=1.4
gstreamer-video-1.0>=1.4
gstreamer-app-1.0>=1.4

View File

@@ -29,7 +29,7 @@ extern "C" {
#include <stdbool.h>
#include "../lib/raop_ntp.h"
void gstreamer_init();
bool gstreamer_init();
void audio_renderer_init(logger_t *logger, const char* audiosink);
void audio_renderer_start(unsigned char* compression_type);
void audio_renderer_stop();

View File

@@ -51,14 +51,15 @@ static gboolean check_plugins (void)
gboolean ret;
GstRegistry *registry;
const gchar *needed[] = { "app", "libav", "playback", "autodetect", "videoparsersbad", NULL};
const gchar *gst[] = {"plugins-base", "libav", "plugins-base", "plugins-good", "plugins-bad", NULL};
registry = gst_registry_get ();
ret = TRUE;
for (i = 0; i < g_strv_length ((gchar **) needed); i++) {
GstPlugin *plugin;
plugin = gst_registry_find_plugin (registry, needed[i]);
if (!plugin) {
g_print ("Required gstreamer plugin '%s' not found\n", needed[i]);
g_print ("Required gstreamer plugin '%s' not found\n"
"Missing plugin is contained in '[GStreamer 1.x]-%s'\n",needed[i], gst[i]);
ret = FALSE;
continue;
}
@@ -68,9 +69,9 @@ static gboolean check_plugins (void)
return ret;
}
void gstreamer_init(){
bool gstreamer_init(){
gst_init(NULL,NULL);
g_assert(check_plugins ());
return (bool) check_plugins ();
}
#define NFORMATS 2 /* set to 4 to enable AAC_LD and PCM: allowed, but never seen in real-world use */
@@ -102,10 +103,9 @@ void audio_renderer_init(logger_t *render_logger, const char* audiosink) {
default:
break;
}
g_string_append (launch, "audioconvert ! volume name=volume ! level ! ");
#ifdef _WIN32
g_string_append (launch, "audioconvert ! ");
g_string_append (launch, "audioresample ! "); /* wasapisink must resample from 44.1 kHz to 48 kHz */
#endif
g_string_append (launch, "volume name=volume ! level ! ");
g_string_append (launch, audiosink);
g_string_append (launch, " sync=false");
renderer_type[i]->pipeline = gst_parse_launch(launch->str, &error);

View File

@@ -1,11 +1,11 @@
.TH UXPLAY "1" "August 2022" "1.56" "User Commands"
.TH UXPLAY "1" "October 2022" "1.57" "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.56: An open\-source AirPlay mirroring server based on RPiPlay
UxPlay 1.57: An open\-source AirPlay mirroring server based on RPiPlay
.SH OPTIONS
.TP
.B

View File

@@ -50,7 +50,7 @@
#include "renderers/video_renderer.h"
#include "renderers/audio_renderer.h"
#define VERSION "1.56"
#define VERSION "1.57"
#define DEFAULT_NAME "UxPlay"
#define DEFAULT_DEBUG_LOG false
@@ -841,13 +841,16 @@ int main (int argc, char *argv[]) {
}
if (do_append_hostname) append_hostname(server_name);
if (!gstreamer_init()) {
LOGE ("stopping");
exit (1);
}
render_logger = logger_init();
logger_set_callback(render_logger, log_callback, NULL);
logger_set_level(render_logger, debug_log ? LOGGER_DEBUG : LOGGER_INFO);
gstreamer_init();
if (use_audio) {
audio_renderer_init(render_logger, audiosink.c_str());
} else {