Reland "Remove dependency of video_replay on TestADM."
This reverts commit f9e3bdd2ce410b18ca7e03b3754f94a18eb7ef3a.
Reason for revert: reland with fix
Original change's description:
> Revert "Remove dependency of video_replay on TestADM."
>
> This reverts commit 01716663a9837a26fa292fe70fdea353cbd01a67.
>
> Reason for revert: breaking CallPerfTest
> https://ci.chromium.org/ui/p/webrtc/builders/perf/Perf%20Android32%20(R%20Pixel5)/967/overview
>
> Original change's description:
> > Remove dependency of video_replay on TestADM.
> >
> > This should remove requirement to build TestADM in chromium build.
> >
> > Bug: b/272350185, webrtc:15081
> > Change-Id: Iceb8862aa81099c22bd378ae692229f01ab3314c
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/302380
> > Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Artem Titov <titovartem@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#39934}
>
> Bug: b/272350185, webrtc:15081
> Change-Id: I73aa0fd3c3d8c244d20e5f29f5792a4c7d7e4165
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303160
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Owners-Override: Jeremy Leconte <jleconte@google.com>
> Commit-Queue: Jeremy Leconte <jleconte@google.com>
> Cr-Commit-Position: refs/heads/main@{#39939}
Bug: b/272350185, webrtc:15081
Change-Id: I360ef3e140e60fc21d622480d1f3326e40a76f58
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303400
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Auto-Submit: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39946}
diff --git a/test/BUILD.gn b/test/BUILD.gn
index bd0ba3c..bda1228 100644
--- a/test/BUILD.gn
+++ b/test/BUILD.gn
@@ -1064,6 +1064,12 @@
absl_deps = [ "//third_party/abseil-cpp/absl/functional:any_invocable" ]
}
+rtc_library("video_test_constants") {
+ testonly = true
+ sources = [ "video_test_constants.h" ]
+ deps = [ "../api/units:time_delta" ]
+}
+
rtc_library("test_common") {
testonly = true
sources = [
@@ -1087,6 +1093,7 @@
":scoped_key_value_config",
":test_support",
":video_test_common",
+ ":video_test_constants",
"../api:array_view",
"../api:create_frame_generator",
"../api:frame_generator_api",
diff --git a/test/call_test.cc b/test/call_test.cc
index b6b633f..7a1bbd2 100644
--- a/test/call_test.cc
+++ b/test/call_test.cc
@@ -31,6 +31,7 @@
#include "test/fake_encoder.h"
#include "test/rtp_rtcp_observer.h"
#include "test/testsupport/file_utils.h"
+#include "test/video_test_constants.h"
#include "video/config/video_encoder_config.h"
namespace webrtc {
@@ -176,9 +177,9 @@
}
if (num_video_streams_ > 0) {
- int width = kDefaultWidth;
- int height = kDefaultHeight;
- int frame_rate = kDefaultFramerate;
+ int width = VideoTestConstants::kDefaultWidth;
+ int height = VideoTestConstants::kDefaultHeight;
+ int frame_rate = VideoTestConstants::kDefaultFramerate;
test->ModifyVideoCaptureStartResolution(&width, &height, &frame_rate);
test->ModifyVideoDegradationPreference(°radation_preference_);
CreateFrameGeneratorCapturer(frame_rate, width, height);
@@ -248,13 +249,15 @@
size_t num_video_streams,
size_t num_used_ssrcs,
Transport* send_transport) {
- RTC_DCHECK_LE(num_video_streams + num_used_ssrcs, kNumSsrcs);
+ RTC_DCHECK_LE(num_video_streams + num_used_ssrcs,
+ VideoTestConstants::kNumSsrcs);
*video_config = VideoSendStream::Config(send_transport);
video_config->encoder_settings.encoder_factory = &fake_encoder_factory_;
video_config->encoder_settings.bitrate_allocator_factory =
bitrate_allocator_factory_.get();
video_config->rtp.payload_name = "FAKE";
- video_config->rtp.payload_type = kFakeVideoSendPayloadType;
+ video_config->rtp.payload_type =
+ VideoTestConstants::kFakeVideoSendPayloadType;
video_config->rtp.extmap_allow_mixed = true;
AddRtpExtensionByUri(RtpExtension::kTransportSequenceNumberUri,
&video_config->rtp.extensions);
@@ -274,7 +277,8 @@
&video_encoder_configs_.back());
}
for (size_t i = 0; i < num_video_streams; ++i)
- video_config->rtp.ssrcs.push_back(kVideoSendSsrcs[num_used_ssrcs + i]);
+ video_config->rtp.ssrcs.push_back(
+ VideoTestConstants::kVideoSendSsrcs[num_used_ssrcs + i]);
AddRtpExtensionByUri(RtpExtension::kVideoRotationUri,
&video_config->rtp.extensions);
AddRtpExtensionByUri(RtpExtension::kColorSpaceUri,
@@ -288,12 +292,13 @@
RTC_DCHECK_LE(num_flexfec_streams, 1);
if (num_audio_streams > 0) {
AudioSendStream::Config audio_send_config(send_transport);
- audio_send_config.rtp.ssrc = kAudioSendSsrc;
+ audio_send_config.rtp.ssrc = VideoTestConstants::kAudioSendSsrc;
AddRtpExtensionByUri(RtpExtension::kTransportSequenceNumberUri,
&audio_send_config.rtp.extensions);
audio_send_config.send_codec_spec = AudioSendStream::Config::SendCodecSpec(
- kAudioSendPayloadType, {"opus", 48000, 2, {{"stereo", "1"}}});
+ VideoTestConstants::kAudioSendPayloadType,
+ {"opus", 48000, 2, {{"stereo", "1"}}});
audio_send_config.min_bitrate_bps = 6000;
audio_send_config.max_bitrate_bps = 60000;
audio_send_config.encoder_factory = audio_encoder_factory_;
@@ -302,7 +307,7 @@
// TODO(brandtr): Update this when we support multistream protection.
if (num_flexfec_streams > 0) {
- SetSendFecConfig({kVideoSendSsrcs[0]});
+ SetSendFecConfig({VideoTestConstants::kVideoSendSsrcs[0]});
}
}
@@ -311,23 +316,29 @@
}
void CallTest::SetSendFecConfig(std::vector<uint32_t> video_send_ssrcs) {
- GetVideoSendConfig()->rtp.flexfec.payload_type = kFlexfecPayloadType;
- GetVideoSendConfig()->rtp.flexfec.ssrc = kFlexfecSendSsrc;
+ GetVideoSendConfig()->rtp.flexfec.payload_type =
+ VideoTestConstants::kFlexfecPayloadType;
+ GetVideoSendConfig()->rtp.flexfec.ssrc = VideoTestConstants::kFlexfecSendSsrc;
GetVideoSendConfig()->rtp.flexfec.protected_media_ssrcs = video_send_ssrcs;
}
void CallTest::SetSendUlpFecConfig(VideoSendStream::Config* send_config) {
- send_config->rtp.ulpfec.red_payload_type = kRedPayloadType;
- send_config->rtp.ulpfec.ulpfec_payload_type = kUlpfecPayloadType;
- send_config->rtp.ulpfec.red_rtx_payload_type = kRtxRedPayloadType;
+ send_config->rtp.ulpfec.red_payload_type =
+ VideoTestConstants::kRedPayloadType;
+ send_config->rtp.ulpfec.ulpfec_payload_type =
+ VideoTestConstants::kUlpfecPayloadType;
+ send_config->rtp.ulpfec.red_rtx_payload_type =
+ VideoTestConstants::kRtxRedPayloadType;
}
void CallTest::SetReceiveUlpFecConfig(
VideoReceiveStreamInterface::Config* receive_config) {
- receive_config->rtp.red_payload_type = kRedPayloadType;
- receive_config->rtp.ulpfec_payload_type = kUlpfecPayloadType;
- receive_config->rtp.rtx_associated_payload_types[kRtxRedPayloadType] =
- kRedPayloadType;
+ receive_config->rtp.red_payload_type = VideoTestConstants::kRedPayloadType;
+ receive_config->rtp.ulpfec_payload_type =
+ VideoTestConstants::kUlpfecPayloadType;
+ receive_config->rtp
+ .rtx_associated_payload_types[VideoTestConstants::kRtxRedPayloadType] =
+ VideoTestConstants::kRedPayloadType;
}
void CallTest::CreateSendConfig(size_t num_video_streams,
@@ -375,7 +386,7 @@
int rtp_history_ms) {
RTC_DCHECK(!video_send_config.rtp.ssrcs.empty());
VideoReceiveStreamInterface::Config default_config(rtcp_send_transport);
- default_config.rtp.local_ssrc = kReceiverLocalVideoSsrc;
+ default_config.rtp.local_ssrc = VideoTestConstants::kReceiverLocalVideoSsrc;
default_config.rtp.nack.rtp_history_ms = rtp_history_ms;
// Enable RTT calculation so NTP time estimator will work.
default_config.rtp.rtcp_xr.receiver_reference_time_report =
@@ -388,7 +399,8 @@
video_recv_config.decoders.clear();
if (!video_send_config.rtp.rtx.ssrcs.empty()) {
video_recv_config.rtp.rtx_ssrc = video_send_config.rtp.rtx.ssrcs[i];
- video_recv_config.rtp.rtx_associated_payload_types[kSendRtxPayloadType] =
+ video_recv_config.rtp.rtx_associated_payload_types
+ [VideoTestConstants::kSendRtxPayloadType] =
video_send_config.rtp.payload_type;
}
video_recv_config.rtp.remote_ssrc = video_send_config.rtp.ssrcs[i];
@@ -433,11 +445,12 @@
Transport* transport,
std::string sync_group) {
AudioReceiveStreamInterface::Config audio_config;
- audio_config.rtp.local_ssrc = kReceiverLocalAudioSsrc;
+ audio_config.rtp.local_ssrc = VideoTestConstants::kReceiverLocalAudioSsrc;
audio_config.rtcp_send_transport = transport;
audio_config.rtp.remote_ssrc = send_config.rtp.ssrc;
audio_config.decoder_factory = audio_decoder_factory;
- audio_config.decoder_map = {{kAudioSendPayloadType, {"opus", 48000, 2}}};
+ audio_config.decoder_map = {
+ {VideoTestConstants::kAudioSendPayloadType, {"opus", 48000, 2}}};
audio_config.sync_group = sync_group;
return audio_config;
}
@@ -449,7 +462,7 @@
config.payload_type = send_config.rtp.flexfec.payload_type;
config.rtp.remote_ssrc = send_config.rtp.flexfec.ssrc;
config.protected_media_ssrcs = send_config.rtp.flexfec.protected_media_ssrcs;
- config.rtp.local_ssrc = kReceiverLocalVideoSsrc;
+ config.rtp.local_ssrc = VideoTestConstants::kReceiverLocalVideoSsrc;
if (!video_receive_configs_.empty()) {
video_receive_configs_[0].rtp.protected_by_flexfec = true;
video_receive_configs_[0].rtp.packet_sink_ = this;
@@ -730,33 +743,19 @@
}
}
-constexpr size_t CallTest::kNumSsrcs;
-const int CallTest::kDefaultWidth;
-const int CallTest::kDefaultHeight;
-const int CallTest::kDefaultFramerate;
-const uint32_t CallTest::kSendRtxSsrcs[kNumSsrcs] = {
- 0xBADCAFD, 0xBADCAFE, 0xBADCAFF, 0xBADCB00, 0xBADCB01, 0xBADCB02};
-const uint32_t CallTest::kVideoSendSsrcs[kNumSsrcs] = {
- 0xC0FFED, 0xC0FFEE, 0xC0FFEF, 0xC0FFF0, 0xC0FFF1, 0xC0FFF2};
-const uint32_t CallTest::kAudioSendSsrc = 0xDEADBEEF;
-const uint32_t CallTest::kFlexfecSendSsrc = 0xBADBEEF;
-const uint32_t CallTest::kReceiverLocalVideoSsrc = 0x123456;
-const uint32_t CallTest::kReceiverLocalAudioSsrc = 0x1234567;
-const int CallTest::kNackRtpHistoryMs = 1000;
-
const std::map<uint8_t, MediaType> CallTest::payload_type_map_ = {
- {CallTest::kVideoSendPayloadType, MediaType::VIDEO},
- {CallTest::kFakeVideoSendPayloadType, MediaType::VIDEO},
- {CallTest::kSendRtxPayloadType, MediaType::VIDEO},
- {CallTest::kPayloadTypeVP8, MediaType::VIDEO},
- {CallTest::kPayloadTypeVP9, MediaType::VIDEO},
- {CallTest::kPayloadTypeH264, MediaType::VIDEO},
- {CallTest::kPayloadTypeGeneric, MediaType::VIDEO},
- {CallTest::kRedPayloadType, MediaType::VIDEO},
- {CallTest::kRtxRedPayloadType, MediaType::VIDEO},
- {CallTest::kUlpfecPayloadType, MediaType::VIDEO},
- {CallTest::kFlexfecPayloadType, MediaType::VIDEO},
- {CallTest::kAudioSendPayloadType, MediaType::AUDIO}};
+ {VideoTestConstants::kVideoSendPayloadType, MediaType::VIDEO},
+ {VideoTestConstants::kFakeVideoSendPayloadType, MediaType::VIDEO},
+ {VideoTestConstants::kSendRtxPayloadType, MediaType::VIDEO},
+ {VideoTestConstants::kPayloadTypeVP8, MediaType::VIDEO},
+ {VideoTestConstants::kPayloadTypeVP9, MediaType::VIDEO},
+ {VideoTestConstants::kPayloadTypeH264, MediaType::VIDEO},
+ {VideoTestConstants::kPayloadTypeGeneric, MediaType::VIDEO},
+ {VideoTestConstants::kRedPayloadType, MediaType::VIDEO},
+ {VideoTestConstants::kRtxRedPayloadType, MediaType::VIDEO},
+ {VideoTestConstants::kUlpfecPayloadType, MediaType::VIDEO},
+ {VideoTestConstants::kFlexfecPayloadType, MediaType::VIDEO},
+ {VideoTestConstants::kAudioSendPayloadType, MediaType::AUDIO}};
BaseTest::BaseTest() {}
diff --git a/test/call_test.h b/test/call_test.h
index d6acfef..d01bac4 100644
--- a/test/call_test.h
+++ b/test/call_test.h
@@ -36,6 +36,7 @@
#include "test/rtp_rtcp_observer.h"
#include "test/run_loop.h"
#include "test/scoped_key_value_config.h"
+#include "test/video_test_constants.h"
namespace webrtc {
namespace test {
@@ -47,34 +48,6 @@
CallTest();
virtual ~CallTest();
- static constexpr size_t kNumSsrcs = 6;
- static const int kNumSimulcastStreams = 3;
- static const int kDefaultWidth = 320;
- static const int kDefaultHeight = 180;
- static const int kDefaultFramerate = 30;
- static constexpr TimeDelta kDefaultTimeout = TimeDelta::Seconds(30);
- static constexpr TimeDelta kLongTimeout = TimeDelta::Seconds(120);
- enum classPayloadTypes : uint8_t {
- kSendRtxPayloadType = 98,
- kRtxRedPayloadType = 99,
- kVideoSendPayloadType = 100,
- kAudioSendPayloadType = 103,
- kRedPayloadType = 118,
- kUlpfecPayloadType = 119,
- kFlexfecPayloadType = 120,
- kPayloadTypeH264 = 122,
- kPayloadTypeVP8 = 123,
- kPayloadTypeVP9 = 124,
- kPayloadTypeGeneric = 125,
- kFakeVideoSendPayloadType = 126,
- };
- static const uint32_t kSendRtxSsrcs[kNumSsrcs];
- static const uint32_t kVideoSendSsrcs[kNumSsrcs];
- static const uint32_t kAudioSendSsrc;
- static const uint32_t kFlexfecSendSsrc;
- static const uint32_t kReceiverLocalVideoSsrc;
- static const uint32_t kReceiverLocalAudioSsrc;
- static const int kNackRtpHistoryMs;
static const std::map<uint8_t, MediaType> payload_type_map_;
protected:
diff --git a/test/scenario/BUILD.gn b/test/scenario/BUILD.gn
index d63d591..c3b8847 100644
--- a/test/scenario/BUILD.gn
+++ b/test/scenario/BUILD.gn
@@ -71,6 +71,7 @@
":column_printer",
"..:frame_generator_capturer",
"..:test_video_capturer",
+ "..:video_test_constants",
"../:fake_video_codecs",
"../:fileutils",
"../:test_common",
diff --git a/test/scenario/audio_stream.cc b/test/scenario/audio_stream.cc
index e134e4b..7715555 100644
--- a/test/scenario/audio_stream.cc
+++ b/test/scenario/audio_stream.cc
@@ -11,6 +11,7 @@
#include "absl/memory/memory.h"
#include "test/call_test.h"
+#include "test/video_test_constants.h"
#if WEBRTC_ENABLE_PROTOBUF
RTC_PUSH_IGNORING_WUNDEF()
@@ -103,7 +104,8 @@
// stereo, but the actual channel count used is based on the "stereo"
// parameter.
send_config.send_codec_spec = AudioSendStream::Config::SendCodecSpec(
- CallTest::kAudioSendPayloadType, {"opus", 48000, 2, sdp_params});
+ VideoTestConstants::kAudioSendPayloadType,
+ {"opus", 48000, 2, sdp_params});
RTC_DCHECK_LE(config.source.channels, 2);
send_config.encoder_factory = encoder_factory;
@@ -190,7 +192,7 @@
receiver->ssrc_media_types_[recv_config.rtp.remote_ssrc] = MediaType::AUDIO;
recv_config.decoder_factory = decoder_factory;
recv_config.decoder_map = {
- {CallTest::kAudioSendPayloadType, {"opus", 48000, 2}}};
+ {VideoTestConstants::kAudioSendPayloadType, {"opus", 48000, 2}}};
recv_config.sync_group = config.render.sync_group;
receiver_->SendTask([&] {
receive_stream_ = receiver_->call_->CreateAudioReceiveStream(recv_config);
diff --git a/test/scenario/video_stream.cc b/test/scenario/video_stream.cc
index 3879ec8..937ad4f 100644
--- a/test/scenario/video_stream.cc
+++ b/test/scenario/video_stream.cc
@@ -27,6 +27,7 @@
#include "test/fake_encoder.h"
#include "test/scenario/hardware_codecs.h"
#include "test/testsupport/file_utils.h"
+#include "test/video_test_constants.h"
#include "video/config/encoder_stream_factory.h"
namespace webrtc {
@@ -43,13 +44,13 @@
uint8_t CodecTypeToPayloadType(VideoCodecType codec_type) {
switch (codec_type) {
case VideoCodecType::kVideoCodecGeneric:
- return CallTest::kFakeVideoSendPayloadType;
+ return VideoTestConstants::kFakeVideoSendPayloadType;
case VideoCodecType::kVideoCodecVP8:
- return CallTest::kPayloadTypeVP8;
+ return VideoTestConstants::kPayloadTypeVP8;
case VideoCodecType::kVideoCodecVP9:
- return CallTest::kPayloadTypeVP9;
+ return VideoTestConstants::kPayloadTypeVP9;
case VideoCodecType::kVideoCodecH264:
- return CallTest::kPayloadTypeH264;
+ return VideoTestConstants::kPayloadTypeH264;
default:
RTC_DCHECK_NOTREACHED();
}
@@ -108,18 +109,22 @@
send_config.rtp.extensions = GetVideoRtpExtensions(config);
if (config.stream.use_rtx) {
- send_config.rtp.rtx.payload_type = CallTest::kSendRtxPayloadType;
+ send_config.rtp.rtx.payload_type = VideoTestConstants::kSendRtxPayloadType;
send_config.rtp.rtx.ssrcs = rtx_ssrcs;
}
if (config.stream.use_flexfec) {
- send_config.rtp.flexfec.payload_type = CallTest::kFlexfecPayloadType;
- send_config.rtp.flexfec.ssrc = CallTest::kFlexfecSendSsrc;
+ send_config.rtp.flexfec.payload_type =
+ VideoTestConstants::kFlexfecPayloadType;
+ send_config.rtp.flexfec.ssrc = VideoTestConstants::kFlexfecSendSsrc;
send_config.rtp.flexfec.protected_media_ssrcs = ssrcs;
}
if (config.stream.use_ulpfec) {
- send_config.rtp.ulpfec.red_payload_type = CallTest::kRedPayloadType;
- send_config.rtp.ulpfec.ulpfec_payload_type = CallTest::kUlpfecPayloadType;
- send_config.rtp.ulpfec.red_rtx_payload_type = CallTest::kRtxRedPayloadType;
+ send_config.rtp.ulpfec.red_payload_type =
+ VideoTestConstants::kRedPayloadType;
+ send_config.rtp.ulpfec.ulpfec_payload_type =
+ VideoTestConstants::kUlpfecPayloadType;
+ send_config.rtp.ulpfec.red_rtx_payload_type =
+ VideoTestConstants::kRtxRedPayloadType;
}
return send_config;
}
@@ -323,14 +328,16 @@
recv.renderer = renderer;
if (config.stream.use_rtx) {
recv.rtp.rtx_ssrc = rtx_ssrc;
- recv.rtp.rtx_associated_payload_types[CallTest::kSendRtxPayloadType] =
+ recv.rtp
+ .rtx_associated_payload_types[VideoTestConstants::kSendRtxPayloadType] =
CodecTypeToPayloadType(config.encoder.codec);
}
if (config.stream.use_ulpfec) {
- recv.rtp.red_payload_type = CallTest::kRedPayloadType;
- recv.rtp.ulpfec_payload_type = CallTest::kUlpfecPayloadType;
- recv.rtp.rtx_associated_payload_types[CallTest::kRtxRedPayloadType] =
- CallTest::kRedPayloadType;
+ recv.rtp.red_payload_type = VideoTestConstants::kRedPayloadType;
+ recv.rtp.ulpfec_payload_type = VideoTestConstants::kUlpfecPayloadType;
+ recv.rtp
+ .rtx_associated_payload_types[VideoTestConstants::kRtxRedPayloadType] =
+ VideoTestConstants::kRedPayloadType;
}
recv.sync_group = config.render.sync_group;
return recv;
@@ -564,8 +571,8 @@
if (config.stream.use_flexfec) {
RTC_DCHECK(num_streams == 1);
FlexfecReceiveStream::Config flexfec(feedback_transport);
- flexfec.payload_type = CallTest::kFlexfecPayloadType;
- flexfec.rtp.remote_ssrc = CallTest::kFlexfecSendSsrc;
+ flexfec.payload_type = VideoTestConstants::kFlexfecPayloadType;
+ flexfec.rtp.remote_ssrc = VideoTestConstants::kFlexfecSendSsrc;
flexfec.protected_media_ssrcs = send_stream->rtx_ssrcs_;
flexfec.rtp.local_ssrc = recv_config.rtp.local_ssrc;
receiver_->ssrc_media_types_[flexfec.rtp.remote_ssrc] = MediaType::VIDEO;
diff --git a/test/video_test_constants.h b/test/video_test_constants.h
new file mode 100644
index 0000000..732d4f0
--- /dev/null
+++ b/test/video_test_constants.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2023 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 TEST_VIDEO_TEST_CONSTANTS_H_
+#define TEST_VIDEO_TEST_CONSTANTS_H_
+
+#include <cstdint>
+
+#include "api/units/time_delta.h"
+
+namespace webrtc {
+namespace test {
+
+class VideoTestConstants {
+ public:
+ static constexpr size_t kNumSsrcs = 6;
+ static constexpr int kNumSimulcastStreams = 3;
+ static constexpr int kDefaultWidth = 320;
+ static constexpr int kDefaultHeight = 180;
+ static constexpr int kDefaultFramerate = 30;
+ static constexpr TimeDelta kDefaultTimeout = TimeDelta::Seconds(30);
+ static constexpr TimeDelta kLongTimeout = TimeDelta::Seconds(120);
+ enum classPayloadTypes : uint8_t {
+ kSendRtxPayloadType = 98,
+ kRtxRedPayloadType = 99,
+ kVideoSendPayloadType = 100,
+ kAudioSendPayloadType = 103,
+ kRedPayloadType = 118,
+ kUlpfecPayloadType = 119,
+ kFlexfecPayloadType = 120,
+ kPayloadTypeH264 = 122,
+ kPayloadTypeVP8 = 123,
+ kPayloadTypeVP9 = 124,
+ kPayloadTypeGeneric = 125,
+ kFakeVideoSendPayloadType = 126,
+ };
+ static constexpr uint32_t kSendRtxSsrcs[kNumSsrcs] = {
+ 0xBADCAFD, 0xBADCAFE, 0xBADCAFF, 0xBADCB00, 0xBADCB01, 0xBADCB02};
+ static constexpr uint32_t kVideoSendSsrcs[kNumSsrcs] = {
+ 0xC0FFED, 0xC0FFEE, 0xC0FFEF, 0xC0FFF0, 0xC0FFF1, 0xC0FFF2};
+ static constexpr uint32_t kAudioSendSsrc = 0xDEADBEEF;
+ static constexpr uint32_t kFlexfecSendSsrc = 0xBADBEEF;
+ static constexpr uint32_t kReceiverLocalVideoSsrc = 0x123456;
+ static constexpr uint32_t kReceiverLocalAudioSsrc = 0x1234567;
+ static constexpr int kNackRtpHistoryMs = 1000;
+
+ private:
+ VideoTestConstants() = default;
+};
+
+} // namespace test
+} // namespace webrtc
+
+#endif // TEST_VIDEO_TEST_CONSTANTS_H_