From 4d3d0cffac3d4969851b8856b5ec378ef7b469d0 Mon Sep 17 00:00:00 2001 From: fduncanh Date: Sat, 29 Oct 2022 10:58:06 -0400 Subject: [PATCH] remove (show in -d mode only) terminal messages about connections +edits to README --- README.html | 117 ++++++++++++++++++++++++++++++---------------------- README.md | 76 +++++++++++++++++++++------------- README.txt | 114 +++++++++++++++++++++++++++++--------------------- lib/httpd.c | 2 +- lib/raop.c | 2 +- uxplay.cpp | 4 +- 6 files changed, 186 insertions(+), 129 deletions(-) diff --git a/README.html b/README.html index f330a1a..3746c12 100644 --- a/README.html +++ b/README.html @@ -20,7 +20,7 @@ running UxPlay. Using AirPlay, UxPlay can emulate a second display for macOS clients.

  • Support for older iOS clients (such as 32-bit iPad 2nd gen., iPod Touch 5th gen. and iPhone 4S, when upgraded to iOS 9.3.5, or later -64-bit versions), plus a Windows AirPlay-client emulator, +64-bit devices), plus a Windows AirPlay-client emulator, AirMyPC.

  • Uses GStreamer plugins for audio and video rendering (with options to select different hardware-appropriate output “videosinks” and @@ -30,10 +30,10 @@ pipeline).

  • New: Support for Raspberry Pi, with hardware video acceleration using Video4Linux2 (v4l2), which supports both 32- and 64-bit systems: this is the replacement for 32-bit-only OpenMAX -(omx), for which support by RPi distributions is being discontinued. -(Until GStreamer 1.22 is released, a backport of changes from the -GStreamer development branch is needed: this has now been done by -Raspberry Pi OS (Bullseye); for other distributions a patch to the GStreamer Video4Linux2 plugin, available in the UxPlay Wiki, is @@ -293,6 +293,12 @@ prevents UxPlay from receiving client connection requests unless some network ports are opened. See Troubleshooting below for help with this or other problems.

    +

    To display the accompanying “Cover Art” from sources like Apple Music in Audio-Only (ALAC) mode, run “uxplay -ca <name> &” in the background, then run @@ -313,12 +319,19 @@ instructions for Raspberry Pi (only tested on model 4B):

    @@ -341,18 +354,18 @@ latest GStreamer patches from the Wiki, you will need to use the UxPlay option -bt709: previously the GStreamer v4l2 plugin could not recognise Apple’s color format (an unusual “full-range” variant of the bt709 HDTV standard), which -bt709 fixes. -GStreamer-1.20.4 will have a fix for this, which is included in the -latest patches, so beginning with UxPlay-1.56, the bt709 fix is no -longer automatically applied. After a recent update, Raspberry -Pi OS (Bullseye) now supplies an already-patched GStreamer-1.18.4 that -works with UxPlay, but needs the -bt709 option with -UxPlay-1.56 or later.

  • -
  • The option -v4l2 (also -rpi* -options) causes a crash when the client screen is rotated, if used with -current Raspberry Pi OS version -gstreamer1.0-plugins-good-1.18.4-2+deb11u1+rpt1. Solution: don’t use -these options, or apply the GStreamer backport patch from the UxPlay -Wiki.

  • +GStreamer-1.20.4 has a fix for this, which is included in the latest +patches, so beginning with UxPlay-1.56, the bt709 fix is no longer +automatically applied.

    +
  • As mentioned, Raspberry Pi OS (Bullseye) now supplies a +GStreamer-1.18.4 package with backports that works with UxPlay, but +needs the -bt709 option with UxPlay-1.56 or later. +Although this Raspberry Pi OS package +gstreamer1.0-plugins-good-1.18.4-2+deb11u1+rpt1 works without having to +be patched, don’t use options -v4l2 and +-rpi* with it, as they cause a crash if the client screen +is rotated. (This does not occur when the patch from the UxPlay +Wiki has been applied.)

  • Tip: to start UxPlay on a remote host (such as a Raspberry Pi) using ssh:

  • @@ -369,10 +382,12 @@ FILE (which can be /dev/null to discard it).

    Alma Linux): (sudo yum install) openssl-devel libplist-devel avahi-compat-libdns_sd-devel (some from the “PowerTools” add-on repository) (+libX11-devel for ZOOMFIX). The required GStreamer packages -(some from rpmfusion.org) are: -gstreamer1-devel gstreamer1-plugins-base-devel gstreamer1-libav -gstreamer1-plugins-bad-free (+ gstreamer1-vaapi for intel -graphics).

    +are: gstreamer1-devel gstreamer1-plugins-base-devel gstreamer1-libav +gstreamer1-plugins-bad-free (+ gstreamer1-vaapi for intel graphics); you +may need to get some of them (in particular gstreamer1-libav) from rpmfusion.org (which provides packages +including plugins that RedHat does not ship for license +reasons).

  • OpenSUSE: (sudo zypper install) libopenssl-devel libplist-devel avahi-compat-mDNSResponder-devel (+ libX11-devel for ZOOMFIX). The required GStreamer packages are: gstreamer-devel @@ -380,7 +395,8 @@ gstreamer-plugins-base-devel gstreamer-plugins-libav gstreamer-plugins-bad (+ gstreamer-plugins-vaapi for Intel graphics); in some cases, you may need to use gstreamer packages for OpenSUSE from Packman -“Essentials”.

  • +“Essentials” (which provides packages including plugins that OpenSUSE +does not ship for license reasons).

  • Arch Linux (sudo pacman -Syu) openssl libplist avahi gst-plugins-base gst-plugins-good gst-plugins-bad gst-libav (+ gstreamer-vaapi for Intel graphics). (Also available as a @@ -425,9 +441,9 @@ it, but compiled to use X11).

  • For the “official” release: install both the macOS runtime and development installer packages. Assuming that the latest -release is 1.20.3. install -gstreamer-1.0-1.20.3-universal.pkg and -gstreamer-1.0-devel-1.20.3-universal.pkg. (If you have an +release is 1.20.4. install +gstreamer-1.0-1.20.4-universal.pkg and +gstreamer-1.0-devel-1.20.4-universal.pkg. (If you have an Intel-architecture Mac, and have problems with the “universal” packages, you can also use gstreamer-1.0-1.18.6-x86_64.pkg and gstreamer-1.0-devel-1.18.6-x86_64.pkg.) Click on them to @@ -460,7 +476,9 @@ 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.

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

    Using GStreamer installed from MacPorts (not recommended):

    @@ -628,11 +646,12 @@ such as vaapisink.

    h264 parser element, default is h264parse. Using quotes “…” allows options to be added.

    -vd decoder chooses the GStreamer -pipeline’s h264 decoder element, instead of letting decodebin pick it -for you. Software decoding is done by avdec_h264; various hardware -decoders include: vaapih264dec, nvdec, nvh264dec, v4l2h264dec (these -require that the appropriate hardware is available). Using quotes “…” -allows some parameters to be included with the decoder name.

    +pipeline’s h264 decoder element, instead of the default value +“decodebin” which chooses it for you. Software decoding is done by +avdec_h264; various hardware decoders include: vaapih264dec, nvdec, +nvh264dec, v4l2h264dec (these require that the appropriate hardware is +available). Using quotes “…” allows some parameters to be included with +the decoder name.

    -vc converter chooses the GStreamer pipeline’s videoconverter element, instead of the default value “videoconvert”. When using Video4Linux2 hardware-decoding by a @@ -640,14 +659,14 @@ GPU,-vc v4l2convert will also use the GPU for video conversion. Using quotes “…” allows some parameters to be included with the converter name.

    -vs videosink chooses the GStreamer -videosink, instead of letting autovideosink pick it for you. Some -videosink choices are: ximagesink, xvimagesink, vaapisink (for intel -graphics), gtksink, glimagesink, waylandsink, osximagesink (for macOS), -kmssink (for systems without X11, like Raspberry Pi OS lite) or -fpsdisplaysink (which shows the streaming framerate in fps). Using -quotes “…” allows some parameters to be included with the videosink -name. For example, fullscreen mode is supported by the -vaapisink plugin, and is obtained using +videosink, instead of the default value “autovideosink” which chooses it +for you. Some videosink choices are: ximagesink, xvimagesink, vaapisink +(for intel graphics), gtksink, glimagesink, waylandsink, osximagesink +(for macOS), kmssink (for systems without X11, like Raspberry Pi OS +lite) or fpsdisplaysink (which shows the streaming framerate in fps). +Using quotes “…” allows some parameters to be included with the +videosink name. For example, fullscreen mode is +supported by the vaapisink plugin, and is obtained using -vs "vaapisink fullscreen=true"; this also works with waylandsink. The syntax of such options is specific to a given plugin, and some choices of videosink might not work on your @@ -770,9 +789,9 @@ containerized to make it playable with standard audio players.

    -d Enable debug output. Note: this does not show GStreamer error or debug messages. To see GStreamer error and warning messages, set the environment variable GST_DEBUG with “export -GST_DEBUG=2” before running uxplay. To see GStreamer debug messages, set -GST_DEBUG=4; increase this to see even more of the GStreamer inner -workings.

    +GST_DEBUG=2” before running uxplay. To see GStreamer information +messages, set GST_DEBUG=4; for DEBUG messages, GST_DEBUG=5; increase +this to see even more of the GStreamer inner workings.

    Troubleshooting

    Note: uxplay is run from a terminal command line, and informational messages are written to the terminal.

    @@ -972,7 +991,7 @@ the client by the AirPlay server) to be set. The “features” code and other settings are set in UxPlay/lib/dnssdint.h.

    Changelog

    1.58 2022-10-29 Add option “-nohold” that will drop existing -connections when a new client connects.

    +connections when a new client connects. Update llhttp to v8.1.0.

    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 diff --git a/README.md b/README.md index e79e4fb..d49c4bd 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Highlights: as the server running UxPlay. Using AirPlay, UxPlay can emulate a second display for macOS clients. * Support for older iOS clients (such as 32-bit iPad 2nd gen., iPod Touch 5th gen. and - iPhone 4S, when upgraded to iOS 9.3.5, or later 64-bit versions), plus a + iPhone 4S, when upgraded to iOS 9.3.5, or later 64-bit devices), plus a Windows AirPlay-client emulator, AirMyPC. * Uses GStreamer plugins for audio and video rendering (with options to select different hardware-appropriate output "videosinks" and @@ -22,7 +22,7 @@ Highlights: * Support for server behind a firewall. * **New**: Support for Raspberry Pi, with hardware video acceleration using Video4Linux2 (v4l2), which supports both 32- and 64-bit systems: this is the replacement for - 32-bit-only OpenMAX (omx), for which support by RPi distributions is being discontinued. (Until GStreamer 1.22 + 32-bit-only OpenMAX (omx), no longer actively supported by RPi distributions. (Until GStreamer 1.22 is released, a backport of changes from the GStreamer development branch is needed: this has now been done by Raspberry Pi OS (Bullseye); for other distributions a [patch](https://github.com/FDH2/UxPlay/wiki/Gstreamer-Video4Linux2-plugin-patches) @@ -249,6 +249,10 @@ UxPlay from receiving client connection requests unless some network ports are opened. See [Troubleshooting](#troubleshooting) below for help with this or other problems. +* By default, UxPlay is locked to +its current client until that client drops the connection; the option `-nohold` modifies this +behavior so that when a new client requests a connection, it removes the current client and takes over. + To display the accompanying "Cover Art" from sources like Apple Music in Audio-Only (ALAC) mode, run "`uxplay -ca &`" in the background, then run a image viewer with an autoreload feature: an example is "feh": run "``feh -R 1 ``" @@ -265,12 +269,16 @@ See [Usage](#usage) for more run-time options. ### **Special instructions for Raspberry Pi (only tested on model 4B)**: -* For good performance, the Raspberry Pi needs the GStreamer Video4linux2 plugin to use its Broadcom GPU hardware for decoding h264 video. -You can also test UxPlay with software-only video decoding using option `-avdec`. +* For good performance, the Raspberry Pi needs the GStreamer Video4linux2 plugin to use its Broadcom GPU hardware +for decoding h264 video. The plugin accesses the GPU using the bcm2835_codec kernel module +which is maintained by Raspberry Pi in the drivers/staging/VC04_services part of +the [Raspberry Pi kernel tree](https://github.com/raspberrypi/linux), but +is not yet included in the mainline Linux kernel. Distributions for R Pi that supply it include Raspberry Pi OS, Ubuntu, +and Manjaro. Some others may not. **Without this kernel module, UxPlay cannot use the GPU.** - -* The upcoming GStreamer-1.22 release will work well, but older releases of GStreamer will not work unless patched with backports of the -improvements from GStreamer-1.22. Raspberry Pi OS (Bullseye) now has the needed backports. For other distributions, patches for GStreamer +* The plugin in the upcoming GStreamer-1.22 release will work well, but the one in older releases of GStreamer will not +work unless patched with backports of the improvements from GStreamer-1.22. Raspberry Pi OS (Bullseye) now has a +working backport. For a fuller backport, or for other distributions, patches for the GStreamer Video4Linux2 plugin 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 @@ -284,14 +292,16 @@ 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 option `-bt709`**: previously the GStreamer v4l2 plugin could -not recognise Apple's color format (an unusual "full-range" variant of the bt709 HDTV standard), which -bt709 fixes. GStreamer-1.20.4 will have -a fix for this, which is included in the latest patches, so beginning with UxPlay-1.56, the bt709 fix is no longer automatically applied. -**After a recent update, Raspberry Pi OS (Bullseye) now supplies an already-patched GStreamer-1.18.4 that works with UxPlay, but -needs the `-bt709` option with UxPlay-1.56 or later.** +not recognise Apple's color format (an unusual "full-range" variant of the bt709 HDTV standard), which -bt709 fixes. GStreamer-1.20.4 has +a fix for this, which is included in the latest patches, so beginning with UxPlay-1.56, the bt709 fix is no longer automatically +applied. + +* As mentioned, **Raspberry Pi OS (Bullseye) now supplies a GStreamer-1.18.4 package with backports that works +with UxPlay, but needs the `-bt709` option with UxPlay-1.56 or later.** Although this Raspberry Pi OS +package gstreamer1.0-plugins-good-1.18.4-2+deb11u1+rpt1 works without having to be patched, +**don't use options `-v4l2` and ``-rpi*`` with it, as they +cause a crash if the client screen is rotated**. (This does not occur when the patch from the UxPlay Wiki has been applied.) -* **The option `-v4l2` (also ``-rpi*`` options) causes a crash when the client screen is rotated, -if used with current Raspberry Pi OS version gstreamer1.0-plugins-good-1.18.4-2+deb11u1+rpt1. Solution: -don't use these options, or apply the GStreamer backport patch from the UxPlay Wiki.** * Tip: to start UxPlay on a remote host (such as a Raspberry Pi) using ssh: @@ -307,14 +317,19 @@ don't use these options, or apply the GStreamer backport patch from the UxPlay * **Red Hat, Fedora, CentOS (now continued as Rocky Linux or Alma Linux):** (sudo yum install) openssl-devel libplist-devel avahi-compat-libdns_sd-devel (some from the "PowerTools" add-on repository) -(+libX11-devel for ZOOMFIX). The required GStreamer packages (some from [rpmfusion.org](https://rpmfusion.org)) are: -gstreamer1-devel gstreamer1-plugins-base-devel gstreamer1-libav gstreamer1-plugins-bad-free (+ gstreamer1-vaapi for intel graphics). +(+libX11-devel for ZOOMFIX). The required GStreamer packages are: +gstreamer1-devel gstreamer1-plugins-base-devel gstreamer1-libav gstreamer1-plugins-bad-free (+ gstreamer1-vaapi +for intel graphics); +you may need to get some of them (in particular gstreamer1-libav) from [rpmfusion.org](https://rpmfusion.org) +(which provides packages including plugins that RedHat does not ship for license reasons). * **OpenSUSE:** (sudo zypper install) libopenssl-devel libplist-devel -avahi-compat-mDNSResponder-devel (+ libX11-devel for ZOOMFIX). The required -GStreamer packages are: gstreamer-devel gstreamer-plugins-base-devel gstreamer-plugins-libav gstreamer-plugins-bad (+ gstreamer-plugins-vaapi for Intel graphics); in some cases, -you may need to use gstreamer packages for OpenSUSE from [Packman](https://ftp.gwdg.de/pub/linux/misc/packman/suse/) "Essentials". +avahi-compat-mDNSResponder-devel (+ libX11-devel for ZOOMFIX). The required GStreamer packages are: gstreamer-devel +gstreamer-plugins-base-devel gstreamer-plugins-libav gstreamer-plugins-bad (+ gstreamer-plugins-vaapi +for Intel graphics); in some cases, you may need to use gstreamer packages for OpenSUSE +from [Packman](https://ftp.gwdg.de/pub/linux/misc/packman/suse/) "Essentials" +(which provides packages including plugins that OpenSUSE does not ship for license reasons). * **Arch Linux** @@ -351,8 +366,8 @@ Next get the latest macOS release of GStreamer-1.0. from [https://gstreamer.freedesktop.org/download/](https://gstreamer.freedesktop.org/download/). The alternative is to install it from Homebrew (MacPorts also supplies it, but compiled to use X11). -**For the "official" release**: install both the macOS runtime and development installer packages. Assuming that the latest release is 1.20.3. -install `gstreamer-1.0-1.20.3-universal.pkg` and ``gstreamer-1.0-devel-1.20.3-universal.pkg``. (If +**For the "official" release**: install both the macOS runtime and development installer packages. Assuming that the latest release is 1.20.4. +install `gstreamer-1.0-1.20.4-universal.pkg` and ``gstreamer-1.0-devel-1.20.4-universal.pkg``. (If you have an Intel-architecture Mac, and have problems with the "universal" packages, you can also use `gstreamer-1.0-1.18.6-x86_64.pkg` and ``gstreamer-1.0-devel-1.18.6-x86_64.pkg``.) Click on them to install (they install to /Library/FrameWorks/GStreamer.framework). @@ -383,7 +398,9 @@ Finally, build and install uxplay (without ZOOMFIX): open a terminal and change * In the case of glimagesink, the resolution settings "-s wxh" do 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. + 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. ***Using GStreamer installed from MacPorts (not recommended):*** @@ -535,8 +552,8 @@ which will not work if a firewall is running. **-vp _parser_** choses the GStreamer pipeline's h264 parser element, default is h264parse. Using quotes "..." allows options to be added. -**-vd _decoder_** chooses the GStreamer pipeline's h264 decoder element, instead of letting - decodebin pick it for you. Software decoding is done by avdec_h264; various hardware decoders +**-vd _decoder_** chooses the GStreamer pipeline's h264 decoder element, instead of the default value + "decodebin" which chooses it for you. Software decoding is done by avdec_h264; various hardware decoders include: vaapih264dec, nvdec, nvh264dec, v4l2h264dec (these require that the appropriate hardware is available). Using quotes "..." allows some parameters to be included with the decoder name. @@ -544,9 +561,10 @@ which will not work if a firewall is running. value "videoconvert". When using Video4Linux2 hardware-decoding by a GPU,`-vc v4l2convert` will also use the GPU for video conversion. Using quotes "..." allows some parameters to be included with the converter name. -**-vs _videosink_** chooses the GStreamer videosink, instead of letting - autovideosink pick it for you. Some videosink choices are: ximagesink, xvimagesink, - vaapisink (for intel graphics), gtksink, glimagesink, waylandsink, osximagesink (for macOS), kmssink (for systems without X11, like Raspberry Pi OS lite) or +**-vs _videosink_** chooses the GStreamer videosink, instead of the default value + "autovideosink" which chooses it for you. Some videosink choices are: ximagesink, xvimagesink, + vaapisink (for intel graphics), gtksink, glimagesink, waylandsink, osximagesink (for macOS), kmssink (for + systems without X11, like Raspberry Pi OS lite) or fpsdisplaysink (which shows the streaming framerate in fps). Using quotes "..." allows some parameters to be included with the videosink name. For example, **fullscreen** mode is supported by the vaapisink plugin, and is @@ -655,7 +673,8 @@ which will not work if a firewall is running. **-d** Enable debug output. Note: this does not show GStreamer error or debug messages. To see GStreamer error and warning messages, set the environment variable GST_DEBUG with "export GST_DEBUG=2" before running uxplay. - To see GStreamer debug messages, set GST_DEBUG=4; increase this to see even more of the GStreamer inner workings. + To see GStreamer information messages, set GST_DEBUG=4; for DEBUG messages, GST_DEBUG=5; increase this to see even + more of the GStreamer inner workings. # Troubleshooting @@ -816,6 +835,7 @@ The "features" code and other settings are set in `UxPlay/lib/dnssdint.h`. # Changelog 1.58 2022-10-29 Add option "-nohold" that will drop existing connections when a new client connects. + Update llhttp to v8.1.0. 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; diff --git a/README.txt b/README.txt index 39c406c..f964d08 100644 --- a/README.txt +++ b/README.txt @@ -18,7 +18,7 @@ Highlights: - Support for older iOS clients (such as 32-bit iPad 2nd gen., iPod Touch 5th gen. and iPhone 4S, when upgraded to iOS 9.3.5, or later - 64-bit versions), plus a Windows AirPlay-client emulator, AirMyPC. + 64-bit devices), plus a Windows AirPlay-client emulator, AirMyPC. - Uses GStreamer plugins for audio and video rendering (with options to select different hardware-appropriate output "videosinks" and @@ -29,9 +29,9 @@ Highlights: - **New**: Support for Raspberry Pi, with hardware video acceleration using Video4Linux2 (v4l2), which supports both 32- and 64-bit - systems: this is the replacement for 32-bit-only OpenMAX (omx), for - which support by RPi distributions is being discontinued. (Until - GStreamer 1.22 is released, a backport of changes from the GStreamer + systems: this is the replacement for 32-bit-only OpenMAX (omx), no + longer actively supported by RPi distributions. (Until GStreamer + 1.22 is released, a backport of changes from the GStreamer development branch is needed: this has now been done by Raspberry Pi OS (Bullseye); for other distributions a [patch](https://github.com/FDH2/UxPlay/wiki/Gstreamer-Video4Linux2-plugin-patches) @@ -293,6 +293,11 @@ prevents UxPlay from receiving client connection requests unless some network ports are opened. See [Troubleshooting](#troubleshooting) below for help with this or other problems. +- By default, UxPlay is locked to its current client until that client + drops the connection; the option `-nohold` modifies this behavior so + that when a new client requests a connection, it removes the current + client and takes over. + To display the accompanying "Cover Art" from sources like Apple Music in Audio-Only (ALAC) mode, run "`uxplay -ca &`" in the background, then run a image viewer with an autoreload feature: an example is "feh": @@ -312,14 +317,20 @@ options. - For good performance, the Raspberry Pi needs the GStreamer Video4linux2 plugin to use its Broadcom GPU hardware for decoding - h264 video. You can also test UxPlay with software-only video - decoding using option `-avdec`. + h264 video. The plugin accesses the GPU using the bcm2835_codec + kernel module which is maintained by Raspberry Pi in the + drivers/staging/VC04_services part of the [Raspberry Pi kernel + tree](https://github.com/raspberrypi/linux), but is not yet included + in the mainline Linux kernel. Distributions for R Pi that supply it + include Raspberry Pi OS, Ubuntu, and Manjaro. Some others may not. + **Without this kernel module, UxPlay cannot use the GPU.** -- The upcoming GStreamer-1.22 release will work well, but older - releases of GStreamer will not work unless patched with backports of - the 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 +- The plugin in the upcoming GStreamer-1.22 release will work well, + but the one in older releases of GStreamer will not work unless + patched with backports of the improvements from GStreamer-1.22. + Raspberry Pi OS (Bullseye) now has a working backport. For a fuller + backport, or for other distributions, patches for the GStreamer + Video4Linux2 plugin 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 @@ -338,18 +349,18 @@ results. GStreamer patches from the Wiki, you will need to use the UxPlay option `-bt709`**: previously the GStreamer v4l2 plugin could not recognise Apple's color format (an unusual "full-range" variant of - the bt709 HDTV standard), which -bt709 fixes. GStreamer-1.20.4 will - have a fix for this, which is included in the latest patches, so - beginning with UxPlay-1.56, the bt709 fix is no longer automatically - applied. **After a recent update, Raspberry Pi OS (Bullseye) now - supplies an already-patched GStreamer-1.18.4 that works with UxPlay, - but needs the `-bt709` option with UxPlay-1.56 or later.** + the bt709 HDTV standard), which -bt709 fixes. GStreamer-1.20.4 has a + fix for this, which is included in the latest patches, so beginning + with UxPlay-1.56, the bt709 fix is no longer automatically applied. -- **The option `-v4l2` (also `-rpi*` options) causes a crash when the - client screen is rotated, if used with current Raspberry Pi OS - version gstreamer1.0-plugins-good-1.18.4-2+deb11u1+rpt1. Solution: - don't use these options, or apply the GStreamer backport patch from - the UxPlay Wiki.** +- As mentioned, **Raspberry Pi OS (Bullseye) now supplies a + GStreamer-1.18.4 package with backports that works with UxPlay, but + needs the `-bt709` option with UxPlay-1.56 or later.** Although this + Raspberry Pi OS package + gstreamer1.0-plugins-good-1.18.4-2+deb11u1+rpt1 works without having + to be patched, **don't use options `-v4l2` and `-rpi*` with it, as + they cause a crash if the client screen is rotated**. (This does not + occur when the patch from the UxPlay Wiki has been applied.) - Tip: to start UxPlay on a remote host (such as a Raspberry Pi) using ssh: @@ -371,9 +382,12 @@ running if the ssh session is closed. Terminal output is saved to FILE Linux):** (sudo yum install) openssl-devel libplist-devel avahi-compat-libdns_sd-devel (some from the "PowerTools" add-on repository) (+libX11-devel for ZOOMFIX). The required GStreamer - packages (some from [rpmfusion.org](https://rpmfusion.org)) are: - gstreamer1-devel gstreamer1-plugins-base-devel gstreamer1-libav - gstreamer1-plugins-bad-free (+ gstreamer1-vaapi for intel graphics). + packages are: gstreamer1-devel gstreamer1-plugins-base-devel + gstreamer1-libav gstreamer1-plugins-bad-free (+ gstreamer1-vaapi for + intel graphics); you may need to get some of them (in particular + gstreamer1-libav) from [rpmfusion.org](https://rpmfusion.org) (which + provides packages including plugins that RedHat does not ship for + license reasons). - **OpenSUSE:** (sudo zypper install) libopenssl-devel libplist-devel avahi-compat-mDNSResponder-devel (+ libX11-devel for ZOOMFIX). The @@ -383,7 +397,8 @@ running if the ssh session is closed. Terminal output is saved to FILE graphics); in some cases, you may need to use gstreamer packages for OpenSUSE from [Packman](https://ftp.gwdg.de/pub/linux/misc/packman/suse/) - "Essentials". + "Essentials" (which provides packages including plugins that + OpenSUSE does not ship for license reasons). - **Arch Linux** (sudo pacman -Syu) openssl libplist avahi gst-plugins-base gst-plugins-good gst-plugins-bad gst-libav (+ @@ -429,8 +444,8 @@ Next get the latest macOS release of GStreamer-1.0. **For the "official" release**: install both the macOS runtime and development installer packages. Assuming that the latest release is -1.20.3. install `gstreamer-1.0-1.20.3-universal.pkg` and -`gstreamer-1.0-devel-1.20.3-universal.pkg`. (If you have an +1.20.4. install `gstreamer-1.0-1.20.4-universal.pkg` and +`gstreamer-1.0-devel-1.20.4-universal.pkg`. (If you have an Intel-architecture Mac, and have problems with the "universal" packages, you can also use `gstreamer-1.0-1.18.6-x86_64.pkg` and `gstreamer-1.0-devel-1.18.6-x86_64.pkg`.) Click on them to install (they @@ -467,7 +482,9 @@ downloads, "UxPlay" for "git clone" downloads) and build/install with 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. + 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. ***Using GStreamer installed from MacPorts (not recommended):*** @@ -648,11 +665,11 @@ vaapisink. default is h264parse. Using quotes "..." allows options to be added. **-vd *decoder*** chooses the GStreamer pipeline's h264 decoder element, -instead of letting decodebin pick it for you. Software decoding is done -by avdec_h264; various hardware decoders include: vaapih264dec, nvdec, -nvh264dec, v4l2h264dec (these require that the appropriate hardware is -available). Using quotes "..." allows some parameters to be included -with the decoder name. +instead of the default value "decodebin" which chooses it for you. +Software decoding is done by avdec_h264; various hardware decoders +include: vaapih264dec, nvdec, nvh264dec, v4l2h264dec (these require that +the appropriate hardware is available). Using quotes "..." allows some +parameters to be included with the decoder name. **-vc *converter*** chooses the GStreamer pipeline's videoconverter element, instead of the default value "videoconvert". When using @@ -660,17 +677,17 @@ Video4Linux2 hardware-decoding by a GPU,`-vc v4l2convert` will also use the GPU for video conversion. Using quotes "..." allows some parameters to be included with the converter name. -**-vs *videosink*** chooses the GStreamer videosink, instead of letting -autovideosink pick it for you. Some videosink choices are: ximagesink, -xvimagesink, vaapisink (for intel graphics), gtksink, glimagesink, -waylandsink, osximagesink (for macOS), kmssink (for systems without X11, -like Raspberry Pi OS lite) or fpsdisplaysink (which shows the streaming -framerate in fps). Using quotes "..." allows some parameters to be -included with the videosink name. For example, **fullscreen** mode is -supported by the vaapisink plugin, and is obtained using -`-vs "vaapisink fullscreen=true"`; this also works with `waylandsink`. -The syntax of such options is specific to a given plugin, and some -choices of videosink might not work on your system. +**-vs *videosink*** chooses the GStreamer videosink, instead of the +default value "autovideosink" which chooses it for you. Some videosink +choices are: ximagesink, xvimagesink, vaapisink (for intel graphics), +gtksink, glimagesink, waylandsink, osximagesink (for macOS), kmssink +(for systems without X11, like Raspberry Pi OS lite) or fpsdisplaysink +(which shows the streaming framerate in fps). Using quotes "..." allows +some parameters to be included with the videosink name. For example, +**fullscreen** mode is supported by the vaapisink plugin, and is +obtained using `-vs "vaapisink fullscreen=true"`; this also works with +`waylandsink`. The syntax of such options is specific to a given plugin, +and some choices of videosink might not work on your system. **-vs 0** suppresses display of streamed video, but plays streamed audio. (The client's screen is still mirrored at a reduced rate of 1 @@ -801,8 +818,9 @@ audio players.* **-d** Enable debug output. Note: this does not show GStreamer error or debug messages. To see GStreamer error and warning messages, set the environment variable GST_DEBUG with "export GST_DEBUG=2" before running -uxplay. To see GStreamer debug messages, set GST_DEBUG=4; increase this -to see even more of the GStreamer inner workings. +uxplay. To see GStreamer information messages, set GST_DEBUG=4; for +DEBUG messages, GST_DEBUG=5; increase this to see even more of the +GStreamer inner workings. # Troubleshooting @@ -1015,7 +1033,7 @@ other settings are set in `UxPlay/lib/dnssdint.h`. # Changelog 1.58 2022-10-29 Add option "-nohold" that will drop existing connections -when a new client connects. +when a new client connects. Update llhttp to v8.1.0. 1.57 2022-10-09 Minor fixes: (fix coredump on AUR on "stop mirroring", occurs when compiled with AUR CFLAGS -DFORTIFY_SOURCE); graceful exit diff --git a/lib/httpd.c b/lib/httpd.c index 8f4861c..134c67e 100644 --- a/lib/httpd.c +++ b/lib/httpd.c @@ -175,7 +175,7 @@ httpd_accept_connection(httpd_t *httpd, int server_fd, int is_ipv6) /* for uxplay, remove existing connections to make way for new connections: * this will only occur if max_connections > 2 */ if (httpd->open_connections >= 2) { - logger_log(httpd->logger, LOGGER_INFO, "removing current connections to make way for new connection"); + logger_log(httpd->logger, LOGGER_INFO, "Destroying current connections to allow connection by new client"); for (int i = 0; imax_connections; i++) { http_connection_t *connection = &httpd->connections[i]; if (!connection->connected) { diff --git a/lib/raop.c b/lib/raop.c index 3b986f9..57ac40b 100644 --- a/lib/raop.c +++ b/lib/raop.c @@ -359,7 +359,7 @@ static void conn_destroy(void *ptr) { raop_conn_t *conn = ptr; - logger_log(conn->raop->logger, LOGGER_INFO, "Destroying connection"); + logger_log(conn->raop->logger, LOGGER_DEBUG, "Destroying connection"); if (conn->raop->callbacks.conn_destroy) { conn->raop->callbacks.conn_destroy(conn->raop->callbacks.cls); diff --git a/uxplay.cpp b/uxplay.cpp index 166cb0f..09e740e 100644 --- a/uxplay.cpp +++ b/uxplay.cpp @@ -949,14 +949,14 @@ int main (int argc, char *argv[]) { extern "C" void conn_init (void *cls) { open_connections++; connections_stopped = false; - LOGI("Open connections: %i", open_connections); + //LOGD("Open connections: %i", open_connections); //video_renderer_update_background(1); } extern "C" void conn_destroy (void *cls) { //video_renderer_update_background(-1); open_connections--; - LOGI("Open connections: %i", open_connections); + //LOGD("Open connections: %i", open_connections); if (!open_connections) { connections_stopped = true; }