tor-browser

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

commit 3a2aaf84c390d79ef98cd8dae18f014261a1d68d
parent ff984e485a6836801c32c23b44c6d9e466c58355
Author: Dan Baker <dbaker@mozilla.com>
Date:   Mon, 27 Oct 2025 12:08:30 -0600

Bug 1995393 - Vendor libwebrtc from 90ed63787a

Upstream commit: https://webrtc.googlesource.com/src/+/90ed63787ad4bfe0cb09524a7d6e1a484e988020
    Add new methods with return type `RTCErrorOr` for file based codecs.

    Bug: webrtc:358039777
    Change-Id: If678452312c1984a51d182e0f7caed05963d4fc9
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/405401
    Reviewed-by: Erik Språng <sprang@webrtc.org>
    Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
    Reviewed-by: Artem Titov <titovartem@webrtc.org>
    Commit-Queue: Emil Vardar (xWF) <vardar@google.com>
    Cr-Commit-Position: refs/heads/main@{#45423}

Diffstat:
Mthird_party/libwebrtc/README.mozilla.last-vendor | 4++--
Mthird_party/libwebrtc/video/corruption_detection/evaluation/BUILD.gn | 6+++++-
Mthird_party/libwebrtc/video/corruption_detection/evaluation/file_based_decoder.h | 4+++-
Mthird_party/libwebrtc/video/corruption_detection/evaluation/file_based_encoder.h | 22+++++++++++++++++++---
4 files changed, 29 insertions(+), 7 deletions(-)

diff --git a/third_party/libwebrtc/README.mozilla.last-vendor b/third_party/libwebrtc/README.mozilla.last-vendor @@ -1,4 +1,4 @@ # ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc -libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-27T18:04:56.830326+00:00. +libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-27T18:08:12.895385+00:00. # base of lastest vendoring -040f0e1e58 +90ed63787a diff --git a/third_party/libwebrtc/video/corruption_detection/evaluation/BUILD.gn b/third_party/libwebrtc/video/corruption_detection/evaluation/BUILD.gn @@ -11,7 +11,10 @@ import("../../../webrtc.gni") rtc_library("file_based_decoder") { testonly = true sources = [ "file_based_decoder.h" ] - deps = [ "//third_party/abseil-cpp/absl/strings:string_view" ] + deps = [ + "../../../api:rtc_error", + "//third_party/abseil-cpp/absl/strings:string_view", + ] } rtc_library("file_based_encoder") { @@ -19,6 +22,7 @@ rtc_library("file_based_encoder") { sources = [ "file_based_encoder.h" ] deps = [ ":test_clip", + "../../../api:rtc_error", "../../../api/units:data_rate", "../../../api/video:video_frame", ] diff --git a/third_party/libwebrtc/video/corruption_detection/evaluation/file_based_decoder.h b/third_party/libwebrtc/video/corruption_detection/evaluation/file_based_decoder.h @@ -14,6 +14,7 @@ #include <string> #include "absl/strings/string_view.h" +#include "api/rtc_error.h" namespace webrtc { @@ -28,7 +29,8 @@ class FileBasedDecoder { // Decodes the encoded file at `encoded_file_path` to a Y4M file. Returns the // path to the decoded file if successful. - virtual std::string Decode(absl::string_view encoded_file_path) = 0; + virtual RTCErrorOr<std::string> Decode( + absl::string_view encoded_file_path) = 0; }; } // namespace webrtc diff --git a/third_party/libwebrtc/video/corruption_detection/evaluation/file_based_encoder.h b/third_party/libwebrtc/video/corruption_detection/evaluation/file_based_encoder.h @@ -13,6 +13,7 @@ #include <string> +#include "api/rtc_error.h" #include "api/units/data_rate.h" #include "api/video/video_codec_type.h" #include "video/corruption_detection/evaluation/test_clip.h" @@ -28,11 +29,26 @@ class FileBasedEncoder { FileBasedEncoder() = default; virtual ~FileBasedEncoder() = default; + // TODO: bugs.webrtc.org/358039777 - Remove. + // [[deprecated("Use following Encode2 instead")]] + virtual std::string Encode(const TestClip& clip, DataRate bitrate) { + RTCErrorOr<std::string> r = Encode2(clip, bitrate); + if (r.ok()) { + return r.value(); + } else { + return ""; + } + } + // Encodes the raw video clip specified by `clip` given in a Y4M or YUV file. // Creates an encoded file where the encoded frames are stored. The encoded - // path is returned if successful. If not successful, an empty string is - // returned. - virtual std::string Encode(const TestClip& clip, DataRate bitrate) = 0; + // path is returned if successful. + // TODO: bugs.webrtc.org/358039777 - Make pure virtual when all subclasses + // has implemented this method. + virtual RTCErrorOr<std::string> Encode2(const TestClip& clip, + DataRate bitrate) { + return RTCError(RTCErrorType::UNSUPPORTED_OPERATION); + } // Returns the used codec for encoding. virtual VideoCodecType GetCodec() const = 0;