mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
Merge pull request #4789 from akallabeth/nightly_ffmpeg_rpm
Enabled ffmpeg support on RPM based systems.
This commit is contained in:
@@ -881,6 +881,20 @@ if (WITH_FFMPEG AND NOT FFMPEG_FOUND)
|
||||
endif()
|
||||
set(WITH_FFMPEG ${FFMPEG_FOUND})
|
||||
|
||||
# Version check, if we have detected FFMPEG but the version is too old
|
||||
# deactivate it as sound backend.
|
||||
if (WITH_DSP_FFMPEG)
|
||||
# Deactivate FFmpeg backend for sound, if the version is too old.
|
||||
# See libfreerdp/codec/dsp_ffmpeg.h
|
||||
check_symbol_exists(LIBAVCODEC_VERSION_MAJOR "libavcodec/version.h" AVCODEC_VERSION_MAJOR)
|
||||
check_symbol_exists(LIBAVCODEC_VERSION_MINOR "libavcodec/version.h" AVCODEC_VERSION_MINOR)
|
||||
check_symbol_exists(LIBAVCODEC_VERSION_MICRO "libavcodec/version.h" AVCODEC_VERSION_MICRO)
|
||||
if (AVCODEC_VERSION_MAJOR LESS 57 OR AVCODEC_VERSION_MINOR LESS 48 OR AVCODEC_VERSION_MICRO LESS 101)
|
||||
message("FFmpeg version detected ${}.${}.${} is too old. (Require at least 57.48.101 for sound). Deactivating")
|
||||
set(WITH_DSP_FFMPEG OFF)
|
||||
endif()
|
||||
endif (WITH_DSP_FFMPEG)
|
||||
|
||||
if (WITH_OPENH264 AND NOT OPENH264_FOUND)
|
||||
message(FATAL_ERROR "OpenH264 support requested but not detected")
|
||||
endif()
|
||||
|
||||
@@ -55,7 +55,6 @@ BuildRequires: pkg-config
|
||||
BuildRequires: libopenssl-devel
|
||||
BuildRequires: alsa-devel
|
||||
BuildRequires: libpulse-devel
|
||||
BuildRequires: libgsm-devel
|
||||
BuildRequires: libusb-1_0-devel
|
||||
BuildRequires: libudev-devel
|
||||
BuildRequires: dbus-1-glib-devel
|
||||
@@ -64,6 +63,8 @@ BuildRequires: gstreamer-plugins-base-devel
|
||||
BuildRequires: wayland-devel
|
||||
BuildRequires: libjpeg-devel
|
||||
BuildRequires: libavutil-devel
|
||||
BuildRequires: libavcodec-devel
|
||||
BuildRequires: libavresample-devel
|
||||
%endif
|
||||
# fedora 21+
|
||||
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7
|
||||
@@ -73,13 +74,13 @@ BuildRequires: pkgconfig
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: alsa-lib-devel
|
||||
BuildRequires: pulseaudio-libs-devel
|
||||
BuildRequires: gsm-devel
|
||||
BuildRequires: libusbx-devel
|
||||
BuildRequires: systemd-devel
|
||||
BuildRequires: dbus-glib-devel
|
||||
BuildRequires: gstreamer1-devel
|
||||
BuildRequires: gstreamer1-plugins-base-devel
|
||||
BuildRequires: libjpeg-turbo-devel
|
||||
BuildRequires: ffmpeg-devel
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
|
||||
@@ -117,7 +118,8 @@ cp %{_topdir}/SOURCES/source_version freerdp-nightly-%{version}/.source_version
|
||||
-DWITH_PCSC=ON \
|
||||
-DWITH_JPEG=ON \
|
||||
-DWITH_GSTREAMER_0_10=ON \
|
||||
-DWITH_GSM=ON \
|
||||
-DWITH_FFMPEG=ON \
|
||||
-DWITH_DSP_FFMPEG=ON \
|
||||
%if %{defined rhel} && 0%{?rhel} <= 7
|
||||
-DWITH_WAYLAND=OFF \
|
||||
%endif
|
||||
@@ -167,6 +169,10 @@ export NO_BRP_CHECK_RPATH true
|
||||
%{INSTALL_PREFIX}/share/man/man1/winpr-hash.1*
|
||||
%{INSTALL_PREFIX}/share/man/man7/wlog.7*
|
||||
|
||||
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8 || %{defined suse_version}
|
||||
%{INSTALL_PREFIX}/share/man/man1/wlfreerdp.1*
|
||||
%endif
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%{INSTALL_PREFIX}/%{_lib}/*.so
|
||||
|
||||
Reference in New Issue
Block a user