From d17775f5e1a6d11d6acdcd2f472ab37399331c7d Mon Sep 17 00:00:00 2001 From: f4exb Date: Thu, 14 Jun 2018 18:01:02 +0200 Subject: [PATCH] DATV demod: include it only if FFmpeg > 3.1 is installed --- Readme.md | 7 +++++++ plugins/channelrx/CMakeLists.txt | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index c12c6538b..a096f77e9 100644 --- a/Readme.md +++ b/Readme.md @@ -351,6 +351,13 @@ Install cmake version 3: - `sudo apt-get remove cmake` (if already installed) - `sudo apt-get install cmake` +

Prerequisites for 16.04 LTS

+ +You need to install the ffmpeg v.3 suite. Therefore you will need to add this PPA to the sources list using this command: +`sudo add-apt-repository ppa:jonathonf/ffmpeg-3` + +Then do `sudo apt-get update` and go to the next step. Alternatively if you have an older version of ffmpeg suite already installed just do `sudo apt-get dist-upgrde`. +

With newer versions just do:

- `sudo apt-get install cmake g++ pkg-config libfftw3-dev libqt5multimedia5-plugins qtmultimedia5-dev qttools5-dev qttools5-dev-tools libqt5opengl5-dev qtbase5-dev libusb-1.0 librtlsdr-dev libboost-all-dev libasound2-dev pulseaudio libnanomsg-dev libopencv-dev libsqlite3-dev libxml2-dev bison flex ffmpeg libavcodec-dev libavformat-dev` diff --git a/plugins/channelrx/CMakeLists.txt b/plugins/channelrx/CMakeLists.txt index 66b1f515f..68bde180f 100644 --- a/plugins/channelrx/CMakeLists.txt +++ b/plugins/channelrx/CMakeLists.txt @@ -15,8 +15,14 @@ if(LIBDSDCC_FOUND AND LIBMBE_FOUND) endif(LIBDSDCC_FOUND AND LIBMBE_FOUND) find_package(FFmpeg) -if(FFMPEG_FOUND) - add_subdirectory(demoddatv) +if (FFMPEG_FOUND) + # You can only get FFmpeg version from the command line + EXECUTE_PROCESS(COMMAND ffmpeg -version COMMAND grep ffmpeg COMMAND cut -d\ -f3 COMMAND tr -d '\n' OUTPUT_VARIABLE FFMPEG_VERSION) + message(STATUS "FFmpeg version ${FFMPEG_VERSION} found") + if(FFMPEG_VERSION VERSION_GREATER "3.1") + message(STATUS "Include demoddatv") + add_subdirectory(demoddatv) + endif() endif() if (BUILD_DEBIAN)