Commit ebff3630 authored by Michael Froman's avatar Michael Froman
Browse files

Bug 1828517 - Vendor libwebrtc from dc39aebd08

Upstream commit: https://webrtc.googlesource.com/src/+/dc39aebd08a845849b255122fcd5167308e122d2
    Add GetRTPVideoHeaderCodecSpecifics() to metadata.

    This will allow exposing VP8, VP9 and H264-specific RTP header metadata
    in JavaScript (behind a flag).

    This information appears to be necessary for cloning
    (https://github.com/w3c/webrtc-encoded-transform/issues/161), and
    cloning should be the same as "new frame + setMetadata + setBytes",
    ergo this should be exposed.

    Bug: webrtc:14709
    Change-Id: Ie71c05f40689bbd529dc4674a07a87c7910b22d5
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290880


    Reviewed-by: default avatarHarald Alvestrand <hta@webrtc.org>
    Commit-Queue: Henrik Boström <hbos@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#39101}
parent f40adee9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -20919,3 +20919,6 @@ e7e53feace
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/moz-central/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
bb25641dd9
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/moz-central/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
dc39aebd08
+2 −0
Original line number Diff line number Diff line
@@ -13968,3 +13968,5 @@ libwebrtc updated from /home/mfroman/mozilla/moz-central/.moz-fast-forward/moz-l
libwebrtc updated from /home/mfroman/mozilla/moz-central/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2023-04-21T15:46:57.324015.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/moz-central/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /home/mfroman/mozilla/moz-central/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2023-04-21T15:47:55.588434.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/moz-central/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /home/mfroman/mozilla/moz-central/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2023-04-21T15:48:50.614212.
+2 −0
Original line number Diff line number Diff line
@@ -337,12 +337,14 @@ rtc_source_set("video_frame_metadata") {
    ":video_frame_type",
    ":video_rtp_headers",
    "..:array_view",
    "../../modules/video_coding:codec_globals_headers",
    "../../rtc_base/system:rtc_export",
    "../transport/rtp:dependency_descriptor",
  ]
  absl_deps = [
    "//third_party/abseil-cpp/absl/container:inlined_vector",
    "//third_party/abseil-cpp/absl/types:optional",
    "//third_party/abseil-cpp/absl/types:variant",
  ]
}

+6 −0
Original line number Diff line number Diff line
@@ -45,6 +45,12 @@ specific_include_rules = {
    "+rtc_base/ref_count.h",
  ],

  "video_frame_metadata\.h": [
    "+modules/video_coding/codecs/h264/include/h264_globals.h",
    "+modules/video_coding/codecs/vp8/include/vp8_globals.h",
    "+modules/video_coding/codecs/vp9/include/vp9_globals.h",
  ],

  "video_stream_decoder_create.cc": [
    "+video/video_stream_decoder_impl.h",
  ],
+12 −0
Original line number Diff line number Diff line
@@ -10,6 +10,8 @@

#include "api/video/video_frame_metadata.h"

#include <utility>

namespace webrtc {

VideoFrameMetadata::VideoFrameMetadata() = default;
@@ -124,4 +126,14 @@ void VideoFrameMetadata::SetCodec(VideoCodecType codec) {
  codec_ = codec;
}

const RTPVideoHeaderCodecSpecifics&
VideoFrameMetadata::GetRTPVideoHeaderCodecSpecifics() const {
  return codec_specifics_;
}

void VideoFrameMetadata::SetRTPVideoHeaderCodecSpecifics(
    RTPVideoHeaderCodecSpecifics codec_specifics) {
  codec_specifics_ = std::move(codec_specifics);
}

}  // namespace webrtc
Loading