tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 182d9ca987fbc93bc0a63c27d8e00f467c91b1c0
parent 333565f56164152d31ddeefef03b78b9a5c3f9db
Author: Andrew Osmond <aosmond@gmail.com>
Date:   Wed, 24 Dec 2025 03:56:26 +0000

Bug 2005011 - Part 5. Ensure we initialize FFmpegEncoderModule for advertising hardware support. r=media-playback-reviewers,padenot

Differential Revision: https://phabricator.services.mozilla.com/D275723

Diffstat:
Mdom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp | 10++++++++++
Mdom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp | 3+++
2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp b/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp @@ -26,6 +26,7 @@ class FFmpegDecoderModule { template <int V> class FFmpegEncoderModule { public: + static void Init(FFmpegLibWrapper*); static already_AddRefed<PlatformEncoderModule> Create(FFmpegLibWrapper*); }; @@ -98,31 +99,40 @@ bool FFmpegRuntimeLinker::Init() { switch (sLibAV.mVersion) { case 53: FFmpegDecoderModule<53>::Init(&sLibAV); + FFmpegEncoderModule<53>::Init(&sLibAV); break; case 54: FFmpegDecoderModule<54>::Init(&sLibAV); + FFmpegEncoderModule<54>::Init(&sLibAV); break; case 55: case 56: FFmpegDecoderModule<55>::Init(&sLibAV); + FFmpegEncoderModule<55>::Init(&sLibAV); break; case 57: FFmpegDecoderModule<57>::Init(&sLibAV); + FFmpegEncoderModule<57>::Init(&sLibAV); break; case 58: FFmpegDecoderModule<58>::Init(&sLibAV); + FFmpegEncoderModule<58>::Init(&sLibAV); break; case 59: FFmpegDecoderModule<59>::Init(&sLibAV); + FFmpegEncoderModule<59>::Init(&sLibAV); break; case 60: FFmpegDecoderModule<60>::Init(&sLibAV); + FFmpegEncoderModule<60>::Init(&sLibAV); break; case 61: FFmpegDecoderModule<61>::Init(&sLibAV); + FFmpegEncoderModule<61>::Init(&sLibAV); break; case 62: FFmpegDecoderModule<62>::Init(&sLibAV); + FFmpegEncoderModule<62>::Init(&sLibAV); break; } return true; diff --git a/dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp b/dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp @@ -26,6 +26,7 @@ class FFmpegDecoderModule { template <int V> class FFmpegEncoderModule { public: + static void Init(FFmpegLibWrapper*); static already_AddRefed<PlatformEncoderModule> Create(FFmpegLibWrapper*); }; @@ -81,6 +82,7 @@ bool FFVPXRuntimeLinker::Init() { if (sLinkStatus) { if (sLinkStatus == LinkStatus_SUCCEEDED) { FFmpegDecoderModule<FFVPX_VERSION>::Init(&sFFVPXLib); + FFmpegEncoderModule<FFVPX_VERSION>::Init(&sFFVPXLib); } return sLinkStatus == LinkStatus_SUCCEEDED; } @@ -135,6 +137,7 @@ bool FFVPXRuntimeLinker::Init() { if (res == FFmpegLibWrapper::LinkResult::Success) { sLinkStatus = LinkStatus_SUCCEEDED; FFmpegDecoderModule<FFVPX_VERSION>::Init(&sFFVPXLib); + FFmpegEncoderModule<FFVPX_VERSION>::Init(&sFFVPXLib); return true; } return false;