From 1102ff7a7513f2634f2c485162fcf47d0c2bed70 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sat, 20 Feb 2021 12:55:20 +0100 Subject: [PATCH] ffmpeg: optionally allow minimal ffmpeg binary in image When testing ffmpeg / hardware decoders it's very convenient if one can do that with ffmpeg instead of only kodi. Using the same ffmpeg patches and options as used by kodi also reduces the risk of testing a different version than what's used by LE/kodi. As the ffmpeg binary is way too minimal for normal use and only intended for internal testing this feature is disabled by default and has to be explicitly requested by building with FFMPEG_TESTING=yes In addition to ffmpeg and ffprobe binaries this enables the null muxer and wrapped_avframe encoder so one can test with "-f null". On RPi it also enables vout_drm (which is only included in jc's tree / RPi ffmpeg patches) so "-f vout_drm" can be used, too. Signed-off-by: Matthias Reichl --- packages/multimedia/ffmpeg/package.mk | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/multimedia/ffmpeg/package.mk b/packages/multimedia/ffmpeg/package.mk index 1846bd5111..61da64e6ff 100644 --- a/packages/multimedia/ffmpeg/package.mk +++ b/packages/multimedia/ffmpeg/package.mk @@ -115,6 +115,15 @@ pre_configure_target() { rm -rf .${TARGET_NAME} } +if [ "${FFMPEG_TESTING}" = "yes" ]; then + PKG_FFMPEG_TESTING="--enable-encoder=wrapped_avframe --enable-muxer=null" + if [ "${PROJECT}" = "RPi" ]; then + PKG_FFMPEG_TESTING+=" --enable-vout-drm --enable-outdev=vout_drm" + fi +else + PKG_FFMPEG_TESTING="--disable-programs" +fi + configure_target() { ./configure --prefix="/usr" \ --cpu="${TARGET_CPU}" \ @@ -146,7 +155,6 @@ configure_target() { --pkg-config="${TOOLCHAIN}/bin/pkg-config" \ --enable-optimizations \ --disable-extra-warnings \ - --disable-programs \ --enable-avdevice \ --enable-avcodec \ --enable-avformat \ @@ -218,7 +226,8 @@ configure_target() { --enable-asm \ --disable-altivec \ ${PKG_FFMPEG_FPU} \ - --disable-symver + --disable-symver \ + ${PKG_FFMPEG_TESTING} } post_makeinstall_target() {