ignore ZOOMFIX request if GStreamer >= 1.20

This commit is contained in:
fduncanh
2022-10-08 03:52:55 -04:00
parent 4c6103b934
commit b410d1a862
5 changed files with 41 additions and 28 deletions

View File

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

View File

@@ -232,7 +232,9 @@ development libraries to be installed: on Debian-based systems do this
with “<code>sudo apt-get install libx11-dev</code>” . “ZOOMFIX” is not 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 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 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"> <ol type="1">
<li><code>sudo apt-get install libssl-dev libplist-dev</code>“. (unless <li><code>sudo apt-get install libssl-dev libplist-dev</code>“. (unless
you need to build OpenSSL and libplist from source).</li> you need to build OpenSSL and libplist from source).</li>
@@ -242,7 +244,7 @@ modify the source, replace this by
<code>mkdir build; cd build; cmake ..</code>”: you can then delete the <code>mkdir build; cd build; cmake ..</code>”: you can then delete the
<code>build</code> directory if needed, without affecting the source.) <code>build</code> directory if needed, without affecting the source.)
Also add any cmake “<code>-D</code>” options here as needed (e.g, 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>make</code></li>
<li><code>sudo make install</code> (you can afterwards uninstall with <li><code>sudo make install</code> (you can afterwards uninstall with
<code>sudo make uninstall</code> in the same directory in which this was <code>sudo make uninstall</code> in the same directory in which this was
@@ -319,7 +321,7 @@ href="https://github.com/FDH2/UxPlay/wiki/Gstreamer-Video4Linux2-plugin-patches"
with instructions in the UxPlay Wiki</a>.</p></li> with instructions in the UxPlay Wiki</a>.</p></li>
</ul> </ul>
<p>The basic uxplay options for R Pi are <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 <code>&lt;videosink&gt;</code> = <code>glimagesink</code> is sometimes
useful. On a system without X11 (like R Pi OS Lite) with framebuffer useful. On a system without X11 (like R Pi OS Lite) with framebuffer
video, use <code>&lt;videosink&gt;</code> = <code>kmssink</code>. With video, use <code>&lt;videosink&gt;</code> = <code>kmssink</code>. With
@@ -566,8 +568,8 @@ used.</p>
ability to toggle into and out of fullscreen mode using the Alt-Enter ability to toggle into and out of fullscreen mode using the Alt-Enter
key combination with option key combination with option
<code>-vs "d3d11videosink fullscreen-toggle-mode=alt-enter"</code>. For <code>-vs "d3d11videosink fullscreen-toggle-mode=alt-enter"</code>. For
convenience, this option will always be set if convenience, this option will be added if just
<code>-vs d3d11videosink</code> is used.</p> <code>-vs d3d11videosink</code> (by itself) is used.</p>
<p>The executable uxplay.exe can also be run without the MSYS2 <p>The executable uxplay.exe can also be run without the MSYS2
environment, in the Windows Terminal, with environment, in the Windows Terminal, with
<code>C:\msys64\mingw64\bin\uxplay</code>.</p> <code>C:\msys64\mingw64\bin\uxplay</code>.</p>
@@ -658,7 +660,7 @@ digital TV. This is no longer needed by GStreamer-1.20.4 and backports
from it.</p> from it.</p>
<p><strong>-rpi</strong> Equivalent to “-v4l2”. Use for “Desktop” <p><strong>-rpi</strong> Equivalent to “-v4l2”. Use for “Desktop”
Raspberry Pi systems with X11.</p> 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> Sometimes better for “Desktop” Raspberry Pi systems with X11.</p>
<p><strong>-rpifb</strong> Equivalent to “-rpi -vs kmssink” (use for <p><strong>-rpifb</strong> Equivalent to “-rpi -vs kmssink” (use for
Raspberry Pi systems using the framebuffer, like RPi OS Bullseye Raspberry Pi systems using the framebuffer, like RPi OS Bullseye

View File

@@ -197,7 +197,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`" . 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 "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, (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`". 1. `sudo apt-get install libssl-dev libplist-dev`".
(unless you need to build OpenSSL and libplist from source). (unless you need to build OpenSSL and libplist from source).
@@ -205,7 +205,7 @@ and alternatives to "ZOOMFIX"
3. `cmake .` (For a cleaner build, which is useful if you modify the source, replace this 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 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 `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` 4. `make`
5. `sudo make install` (you can afterwards uninstall with ``sudo make uninstall`` 5. `sudo make install` (you can afterwards uninstall with ``sudo make uninstall``
in the same directory in which this was run). in the same directory in which this was run).
@@ -270,7 +270,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 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). 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. choice `<videosink>` = ``glimagesink`` is sometimes useful.
On a system without X11 (like R Pi OS Lite) with framebuffer video, use `<videosink>` = ``kmssink``. 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, With the Wayland video compositor, use `<videosink>` = ``waylandsink``. For convenience,
@@ -474,7 +474,7 @@ default audio device is used.
If you wish to specify the videosink using the `-vs <videosink>` option, some choices for `<videosink>` are If you wish to specify the videosink using the `-vs <videosink>` option, some choices for `<videosink>` are
`d3d11videosink`, ``d3dvideosink``, ```glimagesink```, `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 `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 executable uxplay.exe can also be run without the MSYS2 environment, in
the Windows Terminal, with `C:\msys64\mingw64\bin\uxplay`. the Windows Terminal, with `C:\msys64\mingw64\bin\uxplay`.
@@ -562,7 +562,7 @@ which will not work if a firewall is running.
**-rpi** Equivalent to "-v4l2 ". Use for "Desktop" Raspberry Pi systems with X11. **-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 **-rpifb** Equivalent to "-rpi -vs kmssink" (use for Raspberry Pi systems
using the framebuffer, like RPi OS Bullseye Lite). using the framebuffer, like RPi OS Bullseye Lite).

View File

@@ -236,7 +236,8 @@ libraries to be installed: on Debian-based systems do this with
"`sudo apt-get install libx11-dev`" . "ZOOMFIX" is not needed on macOS, "`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 or if you are using non-X11 windows (such as OpenGL) on Linux. See
[ZOOMFIX compile-time option](#zoomfix-compile-time-option) below for [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 1. `sudo apt-get install libssl-dev libplist-dev`". (unless you need to
build OpenSSL and libplist from source). build OpenSSL and libplist from source).
@@ -245,7 +246,7 @@ more information, and alternatives to "ZOOMFIX"
source, replace this by "`mkdir build; cd build; cmake ..`": you can source, replace this by "`mkdir build; cd build; cmake ..`": you can
then delete the `build` directory if needed, without affecting the then delete the `build` directory if needed, without affecting the
source.) Also add any cmake "`-D`" options here as needed (e.g, 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` 4. `make`
5. `sudo make install` (you can afterwards uninstall with 5. `sudo make install` (you can afterwards uninstall with
`sudo make uninstall` in the same directory in which this was run). `sudo make uninstall` in the same directory in which this was run).
@@ -319,16 +320,17 @@ options.
GStreamer are [available with instructions in the UxPlay GStreamer are [available with instructions in the UxPlay
Wiki](https://github.com/FDH2/UxPlay/wiki/Gstreamer-Video4Linux2-plugin-patches). Wiki](https://github.com/FDH2/UxPlay/wiki/Gstreamer-Video4Linux2-plugin-patches).
The basic uxplay options for R Pi are `uxplay -v4l2 [-vs <videosink>]`. The basic uxplay options for R Pi are
The choice `<videosink>` = `glimagesink` is sometimes useful. On a `uxplay [-v4l2] [-vs <videosink>]`. The choice `<videosink>` =
system without X11 (like R Pi OS Lite) with framebuffer video, use `glimagesink` is sometimes useful. On a system without X11 (like R Pi OS
`<videosink>` = `kmssink`. With the Wayland video compositor, use Lite) with framebuffer video, use `<videosink>` = `kmssink`. With the
`<videosink>` = `waylandsink`. For convenience, these options are also Wayland video compositor, use `<videosink>` = `waylandsink`. For
available combined in options `-rpi`, `-rpigl` `-rpifb`, `-rpiwl`, convenience, these options are also available combined in options
respectively provided for X11, X11 with OpenGL, framebuffer, and Wayland `-rpi`, `-rpigl` `-rpifb`, `-rpiwl`, respectively provided for X11, X11
systems. You may find that just "`uxplay`", (*without* `-v4l2` or with OpenGL, framebuffer, and Wayland systems. You may find that just
`-rpi*` options, which lets GStreamer try to find the best video "`uxplay`", (*without* `-v4l2` or `-rpi*` options, which lets GStreamer
solution by itself) provides the best results. 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 - **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 GStreamer patches from the Wiki, you will need to use the UxPlay
@@ -576,8 +578,8 @@ some choices for `<videosink>` are `d3d11videosink`, `d3dvideosink`,
ability to toggle into and out of fullscreen mode using the Alt-Enter ability to toggle into and out of fullscreen mode using the Alt-Enter
key combination with option key combination with option
`-vs "d3d11videosink fullscreen-toggle-mode=alt-enter"`. For `-vs "d3d11videosink fullscreen-toggle-mode=alt-enter"`. For
convenience, this option will always be set if "`-vs d3d11videosink`" is convenience, this option will be added if just `-vs d3d11videosink` (by
used. itself) is used.
The executable uxplay.exe can also be run without the MSYS2 environment, The executable uxplay.exe can also be run without the MSYS2 environment,
in the Windows Terminal, with `C:\msys64\mingw64\bin\uxplay`. in the Windows Terminal, with `C:\msys64\mingw64\bin\uxplay`.
@@ -680,7 +682,7 @@ longer needed by GStreamer-1.20.4 and backports from it.
**-rpi** Equivalent to "-v4l2". Use for "Desktop" Raspberry Pi systems **-rpi** Equivalent to "-v4l2". Use for "Desktop" Raspberry Pi systems
with X11. 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. "Desktop" Raspberry Pi systems with X11.
**-rpifb** Equivalent to "-rpi -vs kmssink" (use for Raspberry Pi **-rpifb** Equivalent to "-rpi -vs kmssink" (use for Raspberry Pi

View File

@@ -10,7 +10,17 @@ if (APPLE )
endif() endif()
find_package( PkgConfig REQUIRED ) 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-sdp-1.0>=1.4
gstreamer-video-1.0>=1.4 gstreamer-video-1.0>=1.4
gstreamer-app-1.0>=1.4 gstreamer-app-1.0>=1.4