diff options
Diffstat (limited to 'media-video/ffmpeg-chromium/files')
-rw-r--r-- | media-video/ffmpeg-chromium/files/chromium.patch | 41 | ||||
-rw-r--r-- | media-video/ffmpeg-chromium/files/ffmpeg-chromium-94.patch | 26 |
2 files changed, 67 insertions, 0 deletions
diff --git a/media-video/ffmpeg-chromium/files/chromium.patch b/media-video/ffmpeg-chromium/files/chromium.patch new file mode 100644 index 000000000000..e24ea84b3df6 --- /dev/null +++ b/media-video/ffmpeg-chromium/files/chromium.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) ++endif ++ ++$(LIBFFMPEG): $(LIBFFMPEG_DEPS) ++ifeq ($(CONFIG_SHARED),yes) ++ $(LIBFFMPEG_LINK) -Wl,--no-as-needed -lavcodec -lavformat -lavutil ++else ++ $(LIBFFMPEG_LINK) -Wl,--whole-archive $^ -Wl,--no-whole-archive $(EXTRALIBS-avcodec) $(EXTRALIBS-avformat) $(EXTRALIBS-avutil) ++endif ++ ++libffmpeg: $(LIBFFMPEG) ++ ++install-libffmpeg: $(LIBFFMPEG) ++ $(Q)mkdir -p "$(SHLIBDIR)/chromium" ++ $(INSTALL) -m 755 $< "$(SHLIBDIR)/chromium/$<.$(SLOT)" ++ $(STRIP) "$(SHLIBDIR)/chromium/$<.$(SLOT)" ++ ++uninstall-libffmpeg: ++ $(RM) "$(SHLIBDIR)/chromium/$(LIBFFMPEG).$(SLOT)" ++ ++.PHONY: libffmpeg install-libffmpeg uninstall-libffmpeg +-- +2.13.1 diff --git a/media-video/ffmpeg-chromium/files/ffmpeg-chromium-94.patch b/media-video/ffmpeg-chromium/files/ffmpeg-chromium-94.patch new file mode 100644 index 000000000000..ba1dfd2c0518 --- /dev/null +++ b/media-video/ffmpeg-chromium/files/ffmpeg-chromium-94.patch @@ -0,0 +1,26 @@ +--- FFmpeg-chromium/configure 2021-10-07 22:32:34.230130424 +0100 ++++ FFmpeg/configure 2021-10-07 22:34:30.978861042 +0100 +@@ -6474,15 +6464,14 @@ + { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } } + enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++" + enabled libopenvino && require libopenvino c_api/ie_c_api.h ie_c_api_version -linference_engine_c_api +-# Chromium uses a built in copy of libopus that is not visible to pkg-config. +-# enabled libopus && { +-# enabled libopus_decoder && { +-# require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create +-# } +-# enabled libopus_encoder && { +-# require_pkg_config libopus opus opus_multistream.h opus_multistream_surround_encoder_create +-# } +-# } ++enabled libopus && { ++ enabled libopus_decoder && { ++ require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create ++ } ++ enabled libopus_encoder && { ++ require_pkg_config libopus opus opus_multistream.h opus_multistream_surround_encoder_create ++ } ++} + enabled libpulse && require_pkg_config libpulse libpulse pulse/pulseaudio.h pa_context_new + enabled librabbitmq && require_pkg_config librabbitmq "librabbitmq >= 0.7.1" amqp.h amqp_new_connection + enabled librav1e && require_pkg_config librav1e "rav1e >= 0.4.0" rav1e.h rav1e_context_new |