[tracker-miners/sam/libav-testing: 35/46] build: Add 'ffmpeg' build option
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/sam/libav-testing: 35/46] build: Add 'ffmpeg' build option
- Date: Mon, 26 Sep 2022 09:06:06 +0000 (UTC)
commit 44c6d969a6cab7cb6ed4bda381925cb7f5698295
Author: Sam Thursfield <sam thursfield codethink co uk>
Date: Wed Aug 31 10:46:52 2022 +0200
build: Add 'ffmpeg' build option
This is the same as 'libav' for now as the two libraries have
similar enough API to be interchangeable for our purposes.
Note that libav is abandoned since 2020[1] so we may eventually drop
that option and leave only 'ffmpeg'.
1. https://lists.libav.org/pipermail/libav-devel/2020-April/086589.html
meson.build | 6 +++++-
meson_options.txt | 4 ++--
src/tracker-extract/meson.build | 2 +-
3 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/meson.build b/meson.build
index 083ca4308..ce1174109 100644
--- a/meson.build
+++ b/meson.build
@@ -265,7 +265,11 @@ elif get_option('generic_media_extractor') == 'gstreamer'
else
error('GStreamer media handler was enabled but required GStreamer libraries were not found')
endif
-elif get_option('generic_media_extractor') == 'libav'
+elif get_option('generic_media_extractor') in ['libav', 'ffmpeg']
+ avcodec = dependency('libavcodec', version: '>= 0.8.4', required: false)
+ avformat = dependency('libavformat', version: '>= 0.8.4', required: false)
+ avutil = dependency('libavutil', version: '>= 0.8.4', required: false)
+
if avcodec.found() and avformat.found() and avutil.found()
generic_media_handler = [avcodec, avformat, avutil]
generic_media_handler_name = 'libav'
diff --git a/meson_options.txt b/meson_options.txt
index d0e3095a1..57e56c16f 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -78,8 +78,8 @@ option('battery_detection', type: 'combo', choices: ['auto', 'hal', 'upower', 'n
description: 'Enable upower or HAL for battery/mains power detection')
option('charset_detection', type: 'combo', choices: ['auto', 'enca', 'icu', 'none'], value: 'auto',
description: 'Enable enca or libicu for charset detection in MP3s')
-option('generic_media_extractor', type: 'combo', choices: ['auto', 'gstreamer', 'libav', 'none'], value:
'auto',
- description: 'Enables one of the (gstreamer, libav, auto) generic media extractor backends')
+option('generic_media_extractor', type: 'combo', choices: ['auto', 'gstreamer', 'ffmpeg', 'libav', 'none'],
value: 'gstreamer',
+ description: 'Enables one of the (gstreamer, ffmpeg, libav) generic media extractor backends')
option('gstreamer_backend', type: 'combo', choices: ['discoverer', 'gupnp'], value: 'discoverer',
description: 'When GStreamer is used, this enables one of the (discoverer, gupnp) GStreamer backends')
diff --git a/src/tracker-extract/meson.build b/src/tracker-extract/meson.build
index 183704e6f..30000a789 100644
--- a/src/tracker-extract/meson.build
+++ b/src/tracker-extract/meson.build
@@ -51,7 +51,7 @@ if libjpeg.found()
modules += [['extract-jpeg', 'tracker-extract-jpeg.c', ['10-jpeg.rule'], [libjpeg,
tracker_miners_common_dep]]]
endif
-if generic_media_handler_name == 'libav'
+if generic_media_handler_name in ['ffmpeg', 'libav']
rules = ['90-libav-audio-generic.rule', '90-libav-video-generic.rule']
dependencies = [avcodec, avformat, avutil, tracker_miners_common_dep]
modules += [['extract-libav', 'tracker-extract-libav.c', rules, dependencies]]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]