diff --git a/CMakeLists.txt b/CMakeLists.txt index c455926b..d2c33b85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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} ) diff --git a/README.html b/README.html index 2f2af644..1b4b1d8a 100644 --- a/README.html +++ b/README.html @@ -1,6 +1,6 @@

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).

Now @@ -56,12 +56,12 @@ posts updates pulled from the new main UxPlay site).

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.

+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.

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 @@

Getting UxPlay:

“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. +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, @@ -232,7 +234,9 @@

Debian-based systems:

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 below for more information, and alternatives to “ZOOMFIX”

+option below for 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).
  2. @@ -242,7 +246,7 @@

    Debian-based systems:

    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).
  3. make
  4. sudo make install (you can afterwards uninstall with sudo make uninstall in the same directory in which this was @@ -319,7 +323,7 @@

    Debian-based systems:

    with instructions in the UxPlay Wiki.

  5. The basic uxplay options for R Pi are -uxplay -v4l2 [-vs <videosink>]. The choice +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 @@ -566,8 +570,8 @@

    Non-Debian-based Linux or 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.

    @@ -658,7 +662,7 @@

    Usage

    from it.

    -rpi Equivalent to “-v4l2”. Use for “Desktop” Raspberry Pi systems with X11.

    -

    -rpigl Equivalent to “-v4l2 -vs glimagesink”. +

    -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 @@ -958,6 +962,11 @@

    5. Mirror screen freezes:

    the client by the AirPlay server) to be set. 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.)

    1.56 2022-07-30 Remove -bt709 from -rpi, -rpiwl, -rpifb as GStreamer diff --git a/README.md b/README.md index 7dcbf293..97da4196 100644 --- a/README.md +++ b/README.md @@ -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 ]```. The +The basic uxplay options for R Pi are ```uxplay [-v4l2] [-vs ]```. The choice `` = ``glimagesink`` is sometimes useful. On a system without X11 (like R Pi OS Lite) with framebuffer video, use `` = ``kmssink``. With the Wayland video compositor, use `` = ``waylandsink``. For convenience, @@ -474,7 +477,7 @@ default audio device is used. If you wish to specify the videosink using the `-vs ` option, some choices for `` 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.) diff --git a/README.txt b/README.txt index 7dd3cc9c..bc156b89 100644 --- a/README.txt +++ b/README.txt @@ -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 (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 ]`. -The choice `` = `glimagesink` is sometimes useful. On a -system without X11 (like R Pi OS Lite) with framebuffer video, use -`` = `kmssink`. With the Wayland video compositor, use -`` = `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 ]`. The choice `` = +`glimagesink` is sometimes useful. On a system without X11 (like R Pi OS +Lite) with framebuffer video, use `` = `kmssink`. With the +Wayland video compositor, use `` = `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 `` 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.) diff --git a/lib/raop_rtp_mirror.c b/lib/raop_rtp_mirror.c index f463e264..ae0577f1 100644 --- a/lib/raop_rtp_mirror.c +++ b/lib/raop_rtp_mirror.c @@ -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"); diff --git a/renderers/CMakeLists.txt b/renderers/CMakeLists.txt index 84ae01b8..f66fea89 100644 --- a/renderers/CMakeLists.txt +++ b/renderers/CMakeLists.txt @@ -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 diff --git a/renderers/audio_renderer.h b/renderers/audio_renderer.h index 094cb32d..71e43219 100644 --- a/renderers/audio_renderer.h +++ b/renderers/audio_renderer.h @@ -29,7 +29,7 @@ extern "C" { #include #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(); diff --git a/renderers/audio_renderer_gstreamer.c b/renderers/audio_renderer_gstreamer.c index 57393a61..3c1d934e 100644 --- a/renderers/audio_renderer_gstreamer.c +++ b/renderers/audio_renderer_gstreamer.c @@ -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); diff --git a/uxplay.1 b/uxplay.1 index 32914704..09a56c71 100644 --- a/uxplay.1 +++ b/uxplay.1 @@ -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 diff --git a/uxplay.cpp b/uxplay.cpp index 6d0fabfe..b6b6129e 100644 --- a/uxplay.cpp +++ b/uxplay.cpp @@ -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 {