[Buildroot] [git commit branch/next] package/ffmpeg: add optional support for opencv

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Fri Aug 26 15:17:47 UTC 2016


commit: https://git.buildroot.net/buildroot/commit/?id=d9ea46425ba886e479b658dc8e7f55cc175cfad7
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/next

ffmpeg only needs the imgproc module of opencv:
https://github.com/FFmpeg/FFmpeg/commit/15708f13477aaf2effdc0d7fc727507bc468335a

Signed-off-by: Bernd Kuhls <bernd.kuhls at t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
---
 package/ffmpeg/ffmpeg.mk | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/package/ffmpeg/ffmpeg.mk b/package/ffmpeg/ffmpeg.mk
index 91e7fa9..1d04101 100644
--- a/package/ffmpeg/ffmpeg.mk
+++ b/package/ffmpeg/ffmpeg.mk
@@ -48,7 +48,6 @@ FFMPEG_CONF_OPTS = \
 	--disable-frei0r \
 	--disable-libopencore-amrnb \
 	--disable-libopencore-amrwb \
-	--disable-libopencv \
 	--disable-libcdio \
 	--disable-libdc1394 \
 	--disable-libfaac \
@@ -249,6 +248,15 @@ else
 FFMPEG_CONF_OPTS += --disable-vdpau
 endif
 
+# To avoid a circular dependency only use opencv if opencv itself does
+# not depend on ffmpeg.
+ifeq ($(BR2_PACKAGE_OPENCV_LIB_IMGPROC)x$(BR2_PACKAGE_OPENCV_WITH_FFMPEG),yx)
+FFMPEG_CONF_OPTS += --enable-libopencv
+FFMPEG_DEPENDENCIES += opencv
+else
+FFMPEG_CONF_OPTS += --disable-libopencv
+endif
+
 ifeq ($(BR2_PACKAGE_OPUS),y)
 FFMPEG_CONF_OPTS += --enable-libopus
 FFMPEG_DEPENDENCIES += opus


More information about the buildroot mailing list