Upstream commit: https://webrtc.googlesource.com/src/+/888fb5647ce3fe5740a33500eaf731ec8c6b1b0d Use StrongAlias for RTP header extension identification. This change introduces RtpHeaderExtensionId as a StrongAlias to improve type safety for RTP header extension IDs. The type is used throughout the RTP stack. The code previous to this change has many different places where it defines what a valid ID is (between 1 and 255) by checking it - having a separate type allows us to centralize that check for validity. IDs need to be allocated at an RTP transport level. Manufacturing your own ID is a footgun - sooner or later the ID you manufacture will be used by the allocator, leading to an unexpected error situation. Having a separate type allows the reader to easily figure out where IDs are being created, and verify that it's either in an unit test or in the allocator. Key changes: - RtpHeaderExtensionId defined in api/rtp_header_extension_id.h - Backwards compatible overloads (taking int) added to public APIs in api/ and modules/rtp_rtcp/ to ensure no breaking changes for downstream projects. - RtpPacket, RtpHeaderExtensionPicker, and other internal components updated to use the new type. - Updated SRTP components to handle RtpHeaderExtensionId. - Fixed naming conflict in fake_rtp.h by renaming kRtcpReport to kFakeRtcpReport. - Updated numerous tests to comply with the new explicit type. Bug: webrtc:514817938 Change-Id: I79eb728f2ebd5c1fe5a1711eae2162c742fd029c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/473880 Auto-Submit: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#47832}
53 lines
1.5 KiB
Diff
53 lines
1.5 KiB
Diff
From: Nico Grunbaum <na-g@nostrum.com>
|
|
Date: Thu, 2 May 2024 00:47:00 -0700
|
|
Subject: Bug 1892299 - fix-afaae4e38a - fix adapted_track_source build
|
|
exclusion;r?mjf
|
|
|
|
Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/60304c5d8a86fdecfe7527e75629dbc65fc9cbc1
|
|
---
|
|
media/BUILD.gn | 17 +++++++++++------
|
|
1 file changed, 11 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/media/BUILD.gn b/media/BUILD.gn
|
|
index b4093c3bee..45611f6db2 100644
|
|
--- a/media/BUILD.gn
|
|
+++ b/media/BUILD.gn
|
|
@@ -56,6 +56,11 @@ rtc_library("rtc_media_base") {
|
|
"base/video_broadcaster.h", # Used downstream
|
|
"base/video_common.h", # Used downstream
|
|
]
|
|
+ if (build_with_mozilla) {
|
|
+ sources -= [
|
|
+ "base/adapted_video_track_source.h",
|
|
+ ]
|
|
+ }
|
|
deps = [
|
|
":adapted_video_track_source",
|
|
":codec",
|
|
@@ -127,12 +132,6 @@ rtc_library("rtc_media_base") {
|
|
"../video/config:encoder_config",
|
|
"//third_party/abseil-cpp/absl/base:core_headers",
|
|
]
|
|
- if (build_with_mozilla) {
|
|
- sources -= [
|
|
- "base/adapted_video_track_source.cc",
|
|
- "base/adapted_video_track_source.h",
|
|
- ]
|
|
- }
|
|
}
|
|
|
|
rtc_library("adapted_video_track_source") {
|
|
@@ -140,6 +139,12 @@ rtc_library("adapted_video_track_source") {
|
|
"base/adapted_video_track_source.cc",
|
|
"base/adapted_video_track_source.h",
|
|
]
|
|
+ if (build_with_mozilla) {
|
|
+ sources -= [
|
|
+ "base/adapted_video_track_source.cc",
|
|
+ "base/adapted_video_track_source.h",
|
|
+ ]
|
|
+ }
|
|
deps = [
|
|
":video_adapter",
|
|
":video_broadcaster",
|