Deduplicate set of the rtp header extension uri constants
Bug: webrtc:7472 Change-Id: Ic0b4f2cc3374ba70a043310b5046d8bf91f0acbe Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231949 Reviewed-by: Tommi <tommi@webrtc.org> Commit-Queue: Tommi <tommi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#34990}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
dc8fc72204
commit
d0321c5e5a
@ -207,7 +207,7 @@ class RtpSenderVideoTest : public ::testing::TestWithParam<bool> {
|
||||
|
||||
TEST_P(RtpSenderVideoTest, KeyFrameHasCVO) {
|
||||
uint8_t kFrame[kMaxPacketLength];
|
||||
rtp_module_->RegisterRtpHeaderExtension(VideoOrientation::kUri,
|
||||
rtp_module_->RegisterRtpHeaderExtension(VideoOrientation::Uri(),
|
||||
kVideoRotationExtensionId);
|
||||
|
||||
RTPVideoHeader hdr;
|
||||
@ -227,7 +227,7 @@ TEST_P(RtpSenderVideoTest, TimingFrameHasPacketizationTimstampSet) {
|
||||
const int64_t kPacketizationTimeMs = 100;
|
||||
const int64_t kEncodeStartDeltaMs = 10;
|
||||
const int64_t kEncodeFinishDeltaMs = 50;
|
||||
rtp_module_->RegisterRtpHeaderExtension(VideoTimingExtension::kUri,
|
||||
rtp_module_->RegisterRtpHeaderExtension(VideoTimingExtension::Uri(),
|
||||
kVideoTimingExtensionId);
|
||||
|
||||
const int64_t kCaptureTimestamp = fake_clock_.TimeInMilliseconds();
|
||||
@ -252,7 +252,7 @@ TEST_P(RtpSenderVideoTest, TimingFrameHasPacketizationTimstampSet) {
|
||||
|
||||
TEST_P(RtpSenderVideoTest, DeltaFrameHasCVOWhenChanged) {
|
||||
uint8_t kFrame[kMaxPacketLength];
|
||||
rtp_module_->RegisterRtpHeaderExtension(VideoOrientation::kUri,
|
||||
rtp_module_->RegisterRtpHeaderExtension(VideoOrientation::Uri(),
|
||||
kVideoRotationExtensionId);
|
||||
|
||||
RTPVideoHeader hdr;
|
||||
@ -276,7 +276,7 @@ TEST_P(RtpSenderVideoTest, DeltaFrameHasCVOWhenChanged) {
|
||||
|
||||
TEST_P(RtpSenderVideoTest, DeltaFrameHasCVOWhenNonZero) {
|
||||
uint8_t kFrame[kMaxPacketLength];
|
||||
rtp_module_->RegisterRtpHeaderExtension(VideoOrientation::kUri,
|
||||
rtp_module_->RegisterRtpHeaderExtension(VideoOrientation::Uri(),
|
||||
kVideoRotationExtensionId);
|
||||
|
||||
RTPVideoHeader hdr;
|
||||
@ -508,7 +508,7 @@ TEST_P(RtpSenderVideoTest, SendsDependencyDescriptorWhenVideoStructureIsSet) {
|
||||
const int64_t kFrameId = 100000;
|
||||
uint8_t kFrame[100];
|
||||
rtp_module_->RegisterRtpHeaderExtension(
|
||||
RtpDependencyDescriptorExtension::kUri, kDependencyDescriptorId);
|
||||
RtpDependencyDescriptorExtension::Uri(), kDependencyDescriptorId);
|
||||
FrameDependencyStructure video_structure;
|
||||
video_structure.num_decode_targets = 2;
|
||||
video_structure.templates = {
|
||||
@ -577,7 +577,7 @@ TEST_P(RtpSenderVideoTest,
|
||||
const int64_t kFrameId = 100000;
|
||||
uint8_t kFrame[100];
|
||||
rtp_module_->RegisterRtpHeaderExtension(
|
||||
RtpDependencyDescriptorExtension::kUri, kDependencyDescriptorId);
|
||||
RtpDependencyDescriptorExtension::Uri(), kDependencyDescriptorId);
|
||||
rtp_module_->SetExtmapAllowMixed(false);
|
||||
FrameDependencyStructure video_structure;
|
||||
video_structure.num_decode_targets = 2;
|
||||
@ -630,7 +630,7 @@ TEST_P(RtpSenderVideoTest, PropagatesChainDiffsIntoDependencyDescriptor) {
|
||||
const int64_t kFrameId = 100000;
|
||||
uint8_t kFrame[100];
|
||||
rtp_module_->RegisterRtpHeaderExtension(
|
||||
RtpDependencyDescriptorExtension::kUri, kDependencyDescriptorId);
|
||||
RtpDependencyDescriptorExtension::Uri(), kDependencyDescriptorId);
|
||||
FrameDependencyStructure video_structure;
|
||||
video_structure.num_decode_targets = 2;
|
||||
video_structure.num_chains = 1;
|
||||
@ -664,7 +664,7 @@ TEST_P(RtpSenderVideoTest,
|
||||
const int64_t kFrameId = 100000;
|
||||
uint8_t kFrame[100];
|
||||
rtp_module_->RegisterRtpHeaderExtension(
|
||||
RtpDependencyDescriptorExtension::kUri, kDependencyDescriptorId);
|
||||
RtpDependencyDescriptorExtension::Uri(), kDependencyDescriptorId);
|
||||
FrameDependencyStructure video_structure;
|
||||
video_structure.num_decode_targets = 2;
|
||||
video_structure.num_chains = 1;
|
||||
@ -698,7 +698,7 @@ TEST_P(RtpSenderVideoTest,
|
||||
const int64_t kFrameId = 100000;
|
||||
uint8_t kFrame[100];
|
||||
rtp_module_->RegisterRtpHeaderExtension(
|
||||
RtpDependencyDescriptorExtension::kUri, kDependencyDescriptorId);
|
||||
RtpDependencyDescriptorExtension::Uri(), kDependencyDescriptorId);
|
||||
FrameDependencyStructure video_structure1;
|
||||
video_structure1.num_decode_targets = 2;
|
||||
video_structure1.templates = {
|
||||
@ -773,7 +773,7 @@ TEST_P(RtpSenderVideoTest,
|
||||
uint8_t kFrame[kFrameSize] = {1, 2, 3, 4};
|
||||
|
||||
rtp_module_->RegisterRtpHeaderExtension(
|
||||
RtpDependencyDescriptorExtension::kUri, kDependencyDescriptorId);
|
||||
RtpDependencyDescriptorExtension::Uri(), kDependencyDescriptorId);
|
||||
rtc::scoped_refptr<MockFrameEncryptor> encryptor(
|
||||
new rtc::RefCountedObject<NiceMock<MockFrameEncryptor>>);
|
||||
ON_CALL(*encryptor, GetMaxCiphertextByteSize).WillByDefault(ReturnArg<1>());
|
||||
@ -815,7 +815,7 @@ TEST_P(RtpSenderVideoTest, PopulateGenericFrameDescriptor) {
|
||||
const int64_t kFrameId = 100000;
|
||||
uint8_t kFrame[100];
|
||||
rtp_module_->RegisterRtpHeaderExtension(
|
||||
RtpGenericFrameDescriptorExtension00::kUri, kGenericDescriptorId);
|
||||
RtpGenericFrameDescriptorExtension00::Uri(), kGenericDescriptorId);
|
||||
|
||||
RTPVideoHeader hdr;
|
||||
RTPVideoHeader::GenericDescriptorInfo& generic = hdr.generic.emplace();
|
||||
@ -847,7 +847,7 @@ void RtpSenderVideoTest::
|
||||
uint8_t kFrame[kFrameSize];
|
||||
|
||||
rtp_module_->RegisterRtpHeaderExtension(
|
||||
RtpGenericFrameDescriptorExtension00::kUri, kGenericDescriptorId);
|
||||
RtpGenericFrameDescriptorExtension00::Uri(), kGenericDescriptorId);
|
||||
|
||||
RTPVideoHeader hdr;
|
||||
hdr.codec = kVideoCodecVP8;
|
||||
@ -882,7 +882,7 @@ TEST_P(RtpSenderVideoTest, VideoLayersAllocationWithResolutionSentOnKeyFrames) {
|
||||
const size_t kFrameSize = 100;
|
||||
uint8_t kFrame[kFrameSize];
|
||||
rtp_module_->RegisterRtpHeaderExtension(
|
||||
RtpVideoLayersAllocationExtension::kUri,
|
||||
RtpVideoLayersAllocationExtension::Uri(),
|
||||
kVideoLayersAllocationExtensionId);
|
||||
|
||||
VideoLayersAllocation allocation;
|
||||
@ -919,7 +919,7 @@ TEST_P(RtpSenderVideoTest,
|
||||
const size_t kFrameSize = 100;
|
||||
uint8_t kFrame[kFrameSize];
|
||||
rtp_module_->RegisterRtpHeaderExtension(
|
||||
RtpVideoLayersAllocationExtension::kUri,
|
||||
RtpVideoLayersAllocationExtension::Uri(),
|
||||
kVideoLayersAllocationExtensionId);
|
||||
|
||||
VideoLayersAllocation allocation;
|
||||
@ -967,7 +967,7 @@ TEST_P(RtpSenderVideoTest,
|
||||
const size_t kFrameSize = 100;
|
||||
uint8_t kFrame[kFrameSize];
|
||||
rtp_module_->RegisterRtpHeaderExtension(
|
||||
RtpVideoLayersAllocationExtension::kUri,
|
||||
RtpVideoLayersAllocationExtension::Uri(),
|
||||
kVideoLayersAllocationExtensionId);
|
||||
|
||||
VideoLayersAllocation allocation;
|
||||
@ -1012,7 +1012,7 @@ TEST_P(RtpSenderVideoTest, VideoLayersAllocationSentOnDeltaFramesOnlyOnUpdate) {
|
||||
const size_t kFrameSize = 100;
|
||||
uint8_t kFrame[kFrameSize];
|
||||
rtp_module_->RegisterRtpHeaderExtension(
|
||||
RtpVideoLayersAllocationExtension::kUri,
|
||||
RtpVideoLayersAllocationExtension::Uri(),
|
||||
kVideoLayersAllocationExtensionId);
|
||||
|
||||
VideoLayersAllocation allocation;
|
||||
@ -1054,7 +1054,7 @@ TEST_P(RtpSenderVideoTest, VideoLayersAllocationNotSentOnHigherTemporalLayers) {
|
||||
const size_t kFrameSize = 100;
|
||||
uint8_t kFrame[kFrameSize];
|
||||
rtp_module_->RegisterRtpHeaderExtension(
|
||||
RtpVideoLayersAllocationExtension::kUri,
|
||||
RtpVideoLayersAllocationExtension::Uri(),
|
||||
kVideoLayersAllocationExtensionId);
|
||||
|
||||
VideoLayersAllocation allocation;
|
||||
@ -1089,7 +1089,7 @@ TEST_P(RtpSenderVideoTest, VideoLayersAllocationNotSentOnHigherTemporalLayers) {
|
||||
TEST_P(RtpSenderVideoTest, AbsoluteCaptureTime) {
|
||||
constexpr int64_t kAbsoluteCaptureTimestampMs = 12345678;
|
||||
uint8_t kFrame[kMaxPacketLength];
|
||||
rtp_module_->RegisterRtpHeaderExtension(AbsoluteCaptureTimeExtension::kUri,
|
||||
rtp_module_->RegisterRtpHeaderExtension(AbsoluteCaptureTimeExtension::Uri(),
|
||||
kAbsoluteCaptureTimeExtensionId);
|
||||
|
||||
RTPVideoHeader hdr;
|
||||
@ -1127,7 +1127,7 @@ TEST_P(RtpSenderVideoTest, AbsoluteCaptureTimeWithCaptureClockOffset) {
|
||||
|
||||
constexpr int64_t kAbsoluteCaptureTimestampMs = 12345678;
|
||||
uint8_t kFrame[kMaxPacketLength];
|
||||
rtp_module_->RegisterRtpHeaderExtension(AbsoluteCaptureTimeExtension::kUri,
|
||||
rtp_module_->RegisterRtpHeaderExtension(AbsoluteCaptureTimeExtension::Uri(),
|
||||
kAbsoluteCaptureTimeExtensionId);
|
||||
|
||||
RTPVideoHeader hdr;
|
||||
@ -1162,7 +1162,7 @@ TEST_P(RtpSenderVideoTest, PopulatesPlayoutDelay) {
|
||||
// Single packet frames.
|
||||
constexpr size_t kPacketSize = 123;
|
||||
uint8_t kFrame[kPacketSize];
|
||||
rtp_module_->RegisterRtpHeaderExtension(PlayoutDelayLimits::kUri,
|
||||
rtp_module_->RegisterRtpHeaderExtension(PlayoutDelayLimits::Uri(),
|
||||
kPlayoutDelayExtensionId);
|
||||
const VideoPlayoutDelay kExpectedDelay = {10, 20};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user