commit 900f7d6897e213e0d6a5f78da41154867860079f
parent 3609f65cff6c34fd6f625ed3a340725a335dd6ec
Author: Michael Froman <mfroman@mozilla.com>
Date: Thu, 9 Oct 2025 09:32:53 -0500
Bug 1993083 - Vendor libwebrtc from dc159bf639
Upstream commit: https://webrtc.googlesource.com/src/+/dc159bf6399e52f4a83726fa341f646d9bb041b1
Add file based decoder, which decodes an encoded video file to a Y4M file.
This is a preparation to be able to use FFmpeg and hence, the hardware encoder and decoders.
Bug: webrtc:358039777
Change-Id: I07c832b80fd5ce98a5871f36357ea87b1352c100
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/398101
Reviewed-by: Fanny Linderborg <linderborg@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Fanny Linderborg <linderborg@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45125}
Diffstat:
3 files changed, 44 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 /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
-libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-09T14:31:37.801032+00:00.
+libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-09T14:32:41.911048+00:00.
# base of lastest vendoring
-c3ac887066
+dc159bf639
diff --git a/third_party/libwebrtc/video/corruption_detection/evaluation/BUILD.gn b/third_party/libwebrtc/video/corruption_detection/evaluation/BUILD.gn
@@ -8,6 +8,12 @@
import("../../../webrtc.gni")
+rtc_library("file_based_decoder") {
+ testonly = true
+ sources = [ "file_based_decoder.h" ]
+ deps = [ "//third_party/abseil-cpp/absl/strings:string_view" ]
+}
+
rtc_library("file_based_encoder") {
testonly = true
sources = [ "file_based_encoder.h" ]
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
@@ -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_FILE_BASED_DECODER_H_
+#define VIDEO_CORRUPTION_DETECTION_EVALUATION_FILE_BASED_DECODER_H_
+
+#include <string>
+
+#include "absl/strings/string_view.h"
+
+namespace webrtc {
+
+// Decodes the video given in `encoded_file_path` if possible. The user cannot
+// reach the individual frames. However, the user should be able to reach the
+// decoded file from the decoded file path returned by `Decode` if successful.
+// The decoded file is in Y4M format.
+class FileBasedDecoder {
+ public:
+ FileBasedDecoder() = default;
+ virtual ~FileBasedDecoder() = default;
+
+ // 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;
+};
+
+} // namespace webrtc
+
+#endif // VIDEO_CORRUPTION_DETECTION_EVALUATION_FILE_BASED_DECODER_H_