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 )
if ( ZOOMFIX )
add_definitions( -DX_DISPLAY_FIX )
find_package( X11 REQUIRED )
link_libraries( ${X11_LIBRARIES} )
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
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 +244,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 +321,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 +568,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 +660,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

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`" .
"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 +205,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 +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
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 +474,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 +562,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).

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,
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 +246,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 +320,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 +578,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 +682,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

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