summaryrefslogtreecommitdiff
path: root/media-video/ffmpeg
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-12-04 04:53:47 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-12-04 04:53:47 +0000
commitd074d0ba59e3121dba0c27c4a18f1e481f67b62a (patch)
treeacee0c96401da7cf239aa11858cb707d4e5ce930 /media-video/ffmpeg
parenta8594a52da11d6e6e42aec90d9658f5fda35a77c (diff)
gentoo auto-resync : 04:12:2023 - 04:53:47
Diffstat (limited to 'media-video/ffmpeg')
-rw-r--r--media-video/ffmpeg/Manifest6
-rw-r--r--media-video/ffmpeg/ffmpeg-6.1.ebuild50
-rw-r--r--media-video/ffmpeg/ffmpeg-9999.ebuild50
-rw-r--r--media-video/ffmpeg/files/chromium-r2.patch41
-rw-r--r--media-video/ffmpeg/files/chromium.c8
5 files changed, 67 insertions, 88 deletions
diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest
index 8f5e47ae7fa5..b7eca4bb2a7a 100644
--- a/media-video/ffmpeg/Manifest
+++ b/media-video/ffmpeg/Manifest
@@ -1,5 +1,7 @@
AUX amf-env-vulkan-override 60 BLAKE2B 409985e6b5ef0e148076c16d8132db2b79ea53e0a922719a37d66fca9920c5fb94d23c22baef39f91e5d5157a7f58bba3e036355b1dbfb5a70153e0cb9764680 SHA512 7711a02b674638f71383a00b867f22fbd2e4d71ed397376fdfe2cb15655ec0a97eb0d613a339a04268726aae3c34efd29d51a3e8f7f90bf3d8634825c0ef3cc7
AUX chromium-r1.patch 1582 BLAKE2B 48547a7d53fd1f0f44b682c7e2306e79f007f8e96b36253f76775c4a3ced54ffaaf403dfaae94e81aa26c60887677b2dabdd2c5cef9fc4553e203f8259453910 SHA512 808daad5afed13a6d3926c9f9ab5cb58f80e16969533022c7ee959147908bb2c12d066d2125a6b6975ef9304d9b8d49c39aeb0a047009adabb4529e3cf54498f
+AUX chromium-r2.patch 1602 BLAKE2B e3f5441dfb3b8b6975da9dc6c1283c814fae24d0c373b86a2b6b8706d7169a63504f258fcef57c28f738aa7dba0b1f3186afebe45e13e1ab14b7538bdeb1b86e SHA512 31ff29d8fdf91cb4151a6a32902aaac55bb0062383619a655db20351582a88c487da528c6cf319717e4f39a140e3721de9d499c3e96ca0ea231aa4651f41ed9d
+AUX chromium.c 215 BLAKE2B 2b5149d401433a362149cd4ff020cdc2217388e3ecac4aef86e7a46c7abb0d13a050eb61eab859578ecb9682e075451e2ccf7c2bda5c7ec397f71b9d06c1cf48 SHA512 552ef0a6316e743be717bdb8f49b69ab0b2acda828ff87f581aaf816d403ff59d5153a57f0bfd3b64e37a4fb8d261f0449b520b7e26feb7fd444cb480dc895b5
AUX ffmpeg-4.4.3-clang-14-ff_seek_frame_binary-crash.patch 1813 BLAKE2B 3fdb56fade5c723fcf387dfe5e31aefbd88e8256fb2ae24a3a90b91902ff18f9ffa9b1e464c0b0b40fad04c7230be7bec78f043b7ce52d70ee94f2a2313dc2b2 SHA512 fb11cb1047d8f44ab9f9f66e52af136b7fea27589929e45afb770e53837954fb03854ea9d839ecee80d3c3d5a493f32bbdbc74e8efc9600d5b53a7d91136abca
AUX ffmpeg-4.4.3-get_cabac_inline_x86-32-bit.patch 1068 BLAKE2B b547cd925bfd506e08d44395c67916fe20b30f397a36adf53fcf277660c45aef9d3d8c014b2bbfcf038539618affb9dd8ff5d93f2fe622e4282c61c4d1b26861 SHA512 779e921e783b800e6bf9bc95af73d44a170287676d17bc22f2b7cd91e393f410ec3f6c7bfa173497443a65496047f39f37cac1d56507271411893c5bdcb37d8b
AUX ffmpeg-4.4.4-fix-build-svt-av1-1.5.0.patch 1882 BLAKE2B e60bb09566cf61018a0e910f32ccc9e9d94695877dccdbeedc0c27996c356c397b59889f5d3997b6cea85acf4228f41bdb8086dfa2dc4b0852f4a8031a6d2c14 SHA512 d29410a1119853c7a7c1762fb557be26b7c38e1787a9ebea744a71438cd701d658d55e4c27350bf2d4ff31a8cdc88e0844fa37b5ade3ef706b3ba1cd1462916e
@@ -35,6 +37,6 @@ EBUILD ffmpeg-5.1.4.ebuild 19781 BLAKE2B 80061e7e49495537d44aa27b25548917542f28d
EBUILD ffmpeg-6.0-r10.ebuild 19920 BLAKE2B 7495f12ac33795a236e7cb73005fac46a368faf28805335cd45e9ce77e25be41c993ab5b451f695db1add5a4227132b65c7816ef5734cb3eaee46cb757c9b301 SHA512 9bacb22199e384518501049bdef6b3bbedcc36082c74e7dfac7c30faa0b467246df22be57212f8c258f48c0c2b3047836a030d72260c5b99458f4697e1c7e19b
EBUILD ffmpeg-6.0-r9.ebuild 19907 BLAKE2B c3c127ac7fef076592dad9ff1e87b42dfd644d1cefe69ec13b3eda1960bf1c29fa7713ce9418c6fb32e77ae4693bf5df1eeb7494567528ed0f68e09ffde8423c SHA512 c3bee889fecd7d4582ef3994d24f570f91e9a8a87471596071cadc3d12a9c9a304d801b60aaefbe8253b802bdbe413ec722f47c6065ace6eac72b18d26efaf18
EBUILD ffmpeg-6.0.1.ebuild 19778 BLAKE2B 7c7e7fc36f4744bafb8d410d737c121faed2d88a0e5c2a6fddc9aa92a683c1e68bf1aa30a4c3af2b730f112d5513aa9b768945035a519fcc9221de2fc5cb5cdc SHA512 fabb81140ee8941edde63ceb3c3601877ab48910c0d837113ed4900e3b840bf6611fc26b2473569353f125fec1edf6919f89e9efc61b877104ff6fbe5fff4de7
-EBUILD ffmpeg-6.1.ebuild 20247 BLAKE2B 866c0254b3d3f2a4f9b0d3dcb02608ad21fd2545aed3219df1073870ff90f019c6326f6b46b8a3e4b191520c04d08da75f237e8ec234f294566857b3b708a90c SHA512 ad46ed50ff4b5b069344f69edf2636c4914fb441d79c6dca433faaf5298678881373f33286ae93fe22223534a12d8c9b2a028896c493b620f8219e2375d8246a
-EBUILD ffmpeg-9999.ebuild 20247 BLAKE2B 866c0254b3d3f2a4f9b0d3dcb02608ad21fd2545aed3219df1073870ff90f019c6326f6b46b8a3e4b191520c04d08da75f237e8ec234f294566857b3b708a90c SHA512 ad46ed50ff4b5b069344f69edf2636c4914fb441d79c6dca433faaf5298678881373f33286ae93fe22223534a12d8c9b2a028896c493b620f8219e2375d8246a
+EBUILD ffmpeg-6.1.ebuild 19364 BLAKE2B a5844745f821742ef4d3db2b7a5e8018f43086b211189686e92607a17a06e0b125c5e605e2582826b1f37b44da98adca1352c96c67217f9217dc5558845e396e SHA512 ab4cd55bdea1f65489f973e619e4463bb4aa0c4e5fa572ba01c11a0fa06cb5efbb0ea449e444a162117ceed5e0cf8c9e91468b7a2f9405ba8cb2df02fa87beac
+EBUILD ffmpeg-9999.ebuild 19364 BLAKE2B a5844745f821742ef4d3db2b7a5e8018f43086b211189686e92607a17a06e0b125c5e605e2582826b1f37b44da98adca1352c96c67217f9217dc5558845e396e SHA512 ab4cd55bdea1f65489f973e619e4463bb4aa0c4e5fa572ba01c11a0fa06cb5efbb0ea449e444a162117ceed5e0cf8c9e91468b7a2f9405ba8cb2df02fa87beac
MISC metadata.xml 7632 BLAKE2B 330de69b251a2e10250ceaf87aec8d3d8004f1ca3cf11ccb4b7603ae906594a4b74b2468bb14ab178d856ebd912a466b0e998f107fad4877f0e89677b99758be SHA512 694ed66f7a19e76739a3c9acd77e72d954dce4c21bf97d591129f87b765780143822e12e656501d6e4bdff3758d821af7f04f4790a531b2c38846311c700262e
diff --git a/media-video/ffmpeg/ffmpeg-6.1.ebuild b/media-video/ffmpeg/ffmpeg-6.1.ebuild
index 992b5f8baa39..188eb6e7b762 100644
--- a/media-video/ffmpeg/ffmpeg-6.1.ebuild
+++ b/media-video/ffmpeg/ffmpeg-6.1.ebuild
@@ -334,6 +334,7 @@ GPL_REQUIRED_USE="
)
"
REQUIRED_USE="
+ chromium? ( opus )
cuda? ( nvenc )
fftools_cws2fws? ( zlib )
glslang? ( vulkan !shaderc )
@@ -350,17 +351,13 @@ RESTRICT="
S=${WORKDIR}/${P/_/-}
PATCHES=(
- "${FILESDIR}"/chromium-r1.patch
+ "${FILESDIR}"/chromium-r2.patch
)
MULTILIB_WRAPPED_HEADERS=(
/usr/include/libavutil/avconfig.h
)
-build_separate_libffmpeg() {
- use opencl
-}
-
pkg_setup() {
# ffmpeg[chromaprint] depends on chromaprint, and chromaprint[tools] depends on ffmpeg.
# May cause breakage while updating, #862996, #625210, #833821.
@@ -386,6 +383,7 @@ src_prepare() {
# will ignore user's preference.
sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure || die
+ ln -snf "${FILESDIR}"/chromium.c chromium.c || die
echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die
}
@@ -538,20 +536,6 @@ multilib_src_configure() {
${EXTRA_FFMPEG_CONF}
echo "${@}"
"${@}" || die
-
- if multilib_is_native_abi && use chromium && build_separate_libffmpeg; then
- einfo "Configuring for Chromium"
- mkdir -p ../chromium || die
- pushd ../chromium >/dev/null || die
- set -- "${@}" \
- --disable-shared \
- --enable-static \
- --enable-pic \
- --disable-opencl
- echo "${@}"
- "${@}" || die
- popd >/dev/null || die
- fi
}
multilib_src_compile() {
@@ -564,16 +548,8 @@ multilib_src_compile() {
fi
done
- if use chromium; then
- if build_separate_libffmpeg; then
- einfo "Compiling for Chromium"
- pushd ../chromium >/dev/null || die
- emake V=1 libffmpeg
- popd >/dev/null || die
- else
- emake V=1 libffmpeg
- fi
- fi
+ use chromium &&
+ emake V=1 libffmpeg
fi
}
@@ -592,20 +568,8 @@ multilib_src_install() {
fi
done
- if use chromium; then
- if build_separate_libffmpeg; then
- einfo "Installing for Chromium"
- pushd ../chromium >/dev/null || die
- emake V=1 DESTDIR="${D}" install-libffmpeg
- popd >/dev/null || die
- else
- emake V=1 DESTDIR="${D}" install-libffmpeg
-
- # When not built separately, libffmpeg has no code of
- # its own so this QA check raises a false positive.
- QA_FLAGS_IGNORED+=" usr/$(get_libdir)/chromium/.*"
- fi
- fi
+ use chromium &&
+ emake V=1 DESTDIR="${D}" install-libffmpeg
fi
}
diff --git a/media-video/ffmpeg/ffmpeg-9999.ebuild b/media-video/ffmpeg/ffmpeg-9999.ebuild
index 992b5f8baa39..188eb6e7b762 100644
--- a/media-video/ffmpeg/ffmpeg-9999.ebuild
+++ b/media-video/ffmpeg/ffmpeg-9999.ebuild
@@ -334,6 +334,7 @@ GPL_REQUIRED_USE="
)
"
REQUIRED_USE="
+ chromium? ( opus )
cuda? ( nvenc )
fftools_cws2fws? ( zlib )
glslang? ( vulkan !shaderc )
@@ -350,17 +351,13 @@ RESTRICT="
S=${WORKDIR}/${P/_/-}
PATCHES=(
- "${FILESDIR}"/chromium-r1.patch
+ "${FILESDIR}"/chromium-r2.patch
)
MULTILIB_WRAPPED_HEADERS=(
/usr/include/libavutil/avconfig.h
)
-build_separate_libffmpeg() {
- use opencl
-}
-
pkg_setup() {
# ffmpeg[chromaprint] depends on chromaprint, and chromaprint[tools] depends on ffmpeg.
# May cause breakage while updating, #862996, #625210, #833821.
@@ -386,6 +383,7 @@ src_prepare() {
# will ignore user's preference.
sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure || die
+ ln -snf "${FILESDIR}"/chromium.c chromium.c || die
echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die
}
@@ -538,20 +536,6 @@ multilib_src_configure() {
${EXTRA_FFMPEG_CONF}
echo "${@}"
"${@}" || die
-
- if multilib_is_native_abi && use chromium && build_separate_libffmpeg; then
- einfo "Configuring for Chromium"
- mkdir -p ../chromium || die
- pushd ../chromium >/dev/null || die
- set -- "${@}" \
- --disable-shared \
- --enable-static \
- --enable-pic \
- --disable-opencl
- echo "${@}"
- "${@}" || die
- popd >/dev/null || die
- fi
}
multilib_src_compile() {
@@ -564,16 +548,8 @@ multilib_src_compile() {
fi
done
- if use chromium; then
- if build_separate_libffmpeg; then
- einfo "Compiling for Chromium"
- pushd ../chromium >/dev/null || die
- emake V=1 libffmpeg
- popd >/dev/null || die
- else
- emake V=1 libffmpeg
- fi
- fi
+ use chromium &&
+ emake V=1 libffmpeg
fi
}
@@ -592,20 +568,8 @@ multilib_src_install() {
fi
done
- if use chromium; then
- if build_separate_libffmpeg; then
- einfo "Installing for Chromium"
- pushd ../chromium >/dev/null || die
- emake V=1 DESTDIR="${D}" install-libffmpeg
- popd >/dev/null || die
- else
- emake V=1 DESTDIR="${D}" install-libffmpeg
-
- # When not built separately, libffmpeg has no code of
- # its own so this QA check raises a false positive.
- QA_FLAGS_IGNORED+=" usr/$(get_libdir)/chromium/.*"
- fi
- fi
+ use chromium &&
+ emake V=1 DESTDIR="${D}" install-libffmpeg
fi
}
diff --git a/media-video/ffmpeg/files/chromium-r2.patch b/media-video/ffmpeg/files/chromium-r2.patch
new file mode 100644
index 000000000000..1de86fe09a1e
--- /dev/null
+++ b/media-video/ffmpeg/files/chromium-r2.patch
@@ -0,0 +1,41 @@
+Allow libffmpeg to be built for Chromium-based browsers
+https://patchwork.ffmpeg.org/patch/4500/
+
+NOTE: This patch lacks the Makefile include line. We append it
+manually instead to make patching across different versions easier.
+
+diff --git a/ffbuild/libffmpeg.mak b/ffbuild/libffmpeg.mak
+new file mode 100644
+index 0000000..992cf3c
+--- /dev/null
++++ b/ffbuild/libffmpeg.mak
+@@ -0,0 +1,27 @@
++LIBFFMPEG = $(SLIBPREF)ffmpeg$(SLIBSUF)
++LIBFFMPEG_LINK = $(LD) -shared -Wl,-soname,$(LIBFFMPEG) -Wl,-Bsymbolic -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--gc-sections $(LDFLAGS) $(LDLIBFLAGS) -o $(LIBFFMPEG)
++
++ifeq ($(CONFIG_SHARED),yes)
++LIBFFMPEG_DEPS = libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) libavformat/$(SLIBPREF)avformat$(SLIBSUF) libavutil/$(SLIBPREF)avutil$(SLIBSUF)
++else
++LIBFFMPEG_DEPS = libavcodec/$(LIBPREF)avcodec$(LIBSUF) libavformat/$(LIBPREF)avformat$(LIBSUF) libavutil/$(LIBPREF)avutil$(LIBSUF) libswresample/$(LIBPREF)swresample$(LIBSUF)
++endif
++
++$(LIBFFMPEG): $(LIBFFMPEG_DEPS) chromium.o
++ifeq ($(CONFIG_SHARED),yes)
++ $(LIBFFMPEG_LINK) -Wl,--no-as-needed chromium.o -lavcodec -lavformat -lavutil
++else
++ $(LIBFFMPEG_LINK) -Wl,--whole-archive $^ -Wl,--no-whole-archive $(EXTRALIBS-avcodec) $(EXTRALIBS-avformat) $(EXTRALIBS-avutil) $(EXTRALIBS-swresample)
++endif
++
++libffmpeg: $(LIBFFMPEG)
++
++install-libffmpeg: $(LIBFFMPEG)
++ $(Q)mkdir -p "$(SHLIBDIR)/chromium"
++ $(INSTALL) -m 755 $< "$(SHLIBDIR)/chromium/$<"
++ $(STRIP) "$(SHLIBDIR)/chromium/$<"
++
++uninstall-libffmpeg:
++ $(RM) "$(SHLIBDIR)/chromium/$(LIBFFMPEG)"
++
++.PHONY: libffmpeg install-libffmpeg uninstall-libffmpeg
+--
+2.13.1
diff --git a/media-video/ffmpeg/files/chromium.c b/media-video/ffmpeg/files/chromium.c
new file mode 100644
index 000000000000..66c2e9f6614f
--- /dev/null
+++ b/media-video/ffmpeg/files/chromium.c
@@ -0,0 +1,8 @@
+#include "libavformat/avformat.h"
+#include "libavformat/internal.h"
+
+int64_t av_stream_get_first_dts(const AVStream *st);
+int64_t av_stream_get_first_dts(const AVStream *st)
+{
+ return cffstream(st)->first_dts;
+}