tor-browser

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

commit 3dfc277c0e3e0a6d311818b1ba83258b6be54490
parent 7a1567d08019a8e19de6ed00c2a183abbea20ccb
Author: Dan Baker <dbaker@mozilla.com>
Date:   Tue,  2 Dec 2025 01:40:19 -0700

Bug 2000941 - Vendor libwebrtc from 6b4c9f790d

Upstream commit: https://webrtc.googlesource.com/src/+/6b4c9f790dfbd6f3a0b12614326345a16fee795b
    Add mocks for file_based_encoder/decoder

    Bug: webrtc:358039777
    Change-Id: If8177fce239f1f770b37a5f186db4bf0114099d5
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/412880
    Reviewed-by: Fanny Linderborg <linderborg@webrtc.org>
    Reviewed-by: Erik Språng <sprang@webrtc.org>
    Commit-Queue: Emil Vardar (xWF) <vardar@google.com>
    Cr-Commit-Position: refs/heads/main@{#45762}

Diffstat:
Mthird_party/libwebrtc/README.mozilla.last-vendor | 4++--
Mthird_party/libwebrtc/video/corruption_detection/evaluation/BUILD.gn | 24++++++++++++++++++++++++
Athird_party/libwebrtc/video/corruption_detection/evaluation/mock_file_based_decoder.h | 33+++++++++++++++++++++++++++++++++
Athird_party/libwebrtc/video/corruption_detection/evaluation/mock_file_based_encoder.h | 36++++++++++++++++++++++++++++++++++++
4 files changed, 95 insertions(+), 2 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-12-02T08:37:46.635397+00:00. +libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-12-02T08:40:04.473822+00:00. # base of lastest vendoring -dfcd6e3b19 +6b4c9f790d diff --git a/third_party/libwebrtc/video/corruption_detection/evaluation/BUILD.gn b/third_party/libwebrtc/video/corruption_detection/evaluation/BUILD.gn @@ -52,6 +52,30 @@ rtc_library("file_based_encoder_with_ivf_transform") { ] } +rtc_library("mock_file_based_decoder") { + testonly = true + sources = [ "mock_file_based_decoder.h" ] + deps = [ + ":file_based_decoder", + "../../../api:rtc_error", + "../../../test:test_support", + "//third_party/abseil-cpp/absl/strings:string_view", + ] +} + +rtc_library("mock_file_based_encoder") { + testonly = true + sources = [ "mock_file_based_encoder.h" ] + deps = [ + ":file_based_encoder", + ":test_clip", + "../../../api:rtc_error", + "../../../api/units:data_rate", + "../../../api/video:video_frame", + "../../../test:test_support", + ] +} + rtc_library("picture_pair_provider") { testonly = true sources = [ "picture_pair_provider.h" ] diff --git a/third_party/libwebrtc/video/corruption_detection/evaluation/mock_file_based_decoder.h b/third_party/libwebrtc/video/corruption_detection/evaluation/mock_file_based_decoder.h @@ -0,0 +1,33 @@ +/* + * Copyright 2025 The WebRTC project authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef VIDEO_CORRUPTION_DETECTION_EVALUATION_MOCK_FILE_BASED_DECODER_H_ +#define VIDEO_CORRUPTION_DETECTION_EVALUATION_MOCK_FILE_BASED_DECODER_H_ + +#include <string> + +#include "absl/strings/string_view.h" +#include "api/rtc_error.h" +#include "test/gmock.h" +#include "video/corruption_detection/evaluation/file_based_decoder.h" + +namespace webrtc { + +class MockFileBasedDecoder : public FileBasedDecoder { + public: + MOCK_METHOD(RTCErrorOr<std::string>, + Decode, + (absl::string_view encoded_file_path), + (override)); +}; + +} // namespace webrtc + +#endif // VIDEO_CORRUPTION_DETECTION_EVALUATION_MOCK_FILE_BASED_DECODER_H_ diff --git a/third_party/libwebrtc/video/corruption_detection/evaluation/mock_file_based_encoder.h b/third_party/libwebrtc/video/corruption_detection/evaluation/mock_file_based_encoder.h @@ -0,0 +1,36 @@ +/* + * Copyright 2025 The WebRTC project authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef VIDEO_CORRUPTION_DETECTION_EVALUATION_MOCK_FILE_BASED_ENCODER_H_ +#define VIDEO_CORRUPTION_DETECTION_EVALUATION_MOCK_FILE_BASED_ENCODER_H_ + +#include <string> + +#include "api/rtc_error.h" +#include "api/units/data_rate.h" +#include "api/video/video_codec_type.h" +#include "test/gmock.h" +#include "video/corruption_detection/evaluation/file_based_encoder.h" +#include "video/corruption_detection/evaluation/test_clip.h" + +namespace webrtc { + +class MockFileBasedEncoder : public FileBasedEncoder { + public: + MOCK_METHOD(RTCErrorOr<std::string>, + Encode, + (const TestClip& clip, DataRate bitrate), + (override)); + MOCK_METHOD(VideoCodecType, GetCodec, (), (const, override)); +}; + +} // namespace webrtc + +#endif // VIDEO_CORRUPTION_DETECTION_EVALUATION_MOCK_FILE_BASED_ENCODER_H_