check that ffmpeg is at least version 3.1 that introduce the API we require
Concern Raised3415015e3d45

Authored by mgallien on May 14 2018, 7:34 PM.

Description

check that ffmpeg is at least version 3.1 that introduce the API we require

Summary: check that ffmpeg is at least version 3.1 that introduce the API we require

Test Plan: checks a working version of ffmpeg

Reviewers: dfaure, michaelh, jriddell, bruns

Reviewed By: dfaure, bruns

Subscribers: bruns, kde-frameworks-devel, Baloo

Tags: Frameworks, Baloo

Differential Revision: https://phabricator.kde.org/D12886

Details

Auditors
romangg
Committed
mgallienMay 15 2018, 4:23 PM
Reviewer
dfaure
Differential Revision
D12886: check that ffmpeg is at least version 3.1 that introduce the API we require
Parents
R286:efbe29f4d0fd: GIT_SILENT Upgrade KF5 version to 5.47.0.
Branches
Unknown
Tags
Unknown
romangg raised a concern with this commit.EditedJun 1 2018, 10:56 AM
romangg added a subscriber: romangg.

On Neon (Xenial based) FFmpeg version is 2.8.14. It still doesn't fail on CMake. It maybe compares 3.1 with the version numbers of the FFmpeg modules. Their major versions are >50. Then it fails on build, because AVCodecParameters is not defined (fails since 037208a787e0).

This commit now has outstanding concerns.Jun 1 2018, 10:56 AM

Sorry for the trouble. I will look at it as soon as I can.

On Neon (Xenial based) FFmpeg version is 2.8.14. It still doesn't fail on CMake. It maybe compares 3.1 with the version numbers of the FFmpeg modules. Their major versions are >50. Then it fails on build, because AVCodecParameters is not defined (fails since 037208a787e0).

I am trying to modify FindFFmpeg.cmake to do version checks.
I did not yet succeeded because I want to check the version for one component at a time. I will ask a review once I am done.

adridg added a subscriber: adridg.Jun 3 2018, 1:24 PM

The FindFFmpeg CMake module uses pkg-config modversions to determine the overall version. These don't match the notion of "FFmpeg release 3.1" because the libraries are versioned separately. For instance:

libavdevice 58.3.100
libavfilter 7.16.100
libavformat 58.12.100
libavutil 56.14.100
libpostproc 55.1.100
libswresample 3.1.100
libavcodec 58.18.100
libswscale 5.1.100

So what you really need to do is check for ffmpeg components with version-numbering corresponding to the API / library version that introduces them -- and/or check for the specific API you need via CheckSymbolExists

The FindFFmpeg CMake module uses pkg-config modversions to determine the overall version. These don't match the notion of "FFmpeg release 3.1" because the libraries are versioned separately. For instance:

libavdevice 58.3.100
libavfilter 7.16.100
libavformat 58.12.100
libavutil 56.14.100
libpostproc 55.1.100
libswresample 3.1.100
libavcodec 58.18.100
libswscale 5.1.100

So what you really need to do is check for ffmpeg components with version-numbering corresponding to the API / library version that introduces them -- and/or check for the specific API you need via CheckSymbolExists

I have pushed D13302 to show you what I am trying to do. Still, the check for the structure member does not yet work.