2013-12-16 12:24:44 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2013 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.
|
|
|
|
|
*/
|
2023-01-19 15:45:58 +00:00
|
|
|
#include <cstddef>
|
2013-12-16 12:24:44 +00:00
|
|
|
#include <functional>
|
|
|
|
|
#include <list>
|
2016-03-12 06:10:44 -08:00
|
|
|
#include <memory>
|
2013-12-16 12:24:44 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
2022-03-14 13:32:04 +01:00
|
|
|
#include "absl/strings/string_view.h"
|
2019-12-05 15:59:00 +01:00
|
|
|
#include "api/test/create_frame_generator.h"
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "call/call.h"
|
2018-08-20 13:27:45 +02:00
|
|
|
#include "call/simulated_network.h"
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "rtc_base/checks.h"
|
|
|
|
|
#include "rtc_base/event.h"
|
|
|
|
|
#include "rtc_base/logging.h"
|
2020-07-06 17:41:35 +02:00
|
|
|
#include "rtc_base/synchronization/mutex.h"
|
2019-10-21 09:24:27 +02:00
|
|
|
#include "rtc_base/task_queue_for_test.h"
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "rtc_base/thread_annotations.h"
|
|
|
|
|
#include "test/call_test.h"
|
|
|
|
|
#include "test/encoder_settings.h"
|
|
|
|
|
#include "test/fake_decoder.h"
|
|
|
|
|
#include "test/fake_encoder.h"
|
|
|
|
|
#include "test/frame_generator_capturer.h"
|
|
|
|
|
#include "test/gtest.h"
|
2023-04-25 09:56:49 +02:00
|
|
|
#include "test/video_test_constants.h"
|
2013-12-16 12:24:44 +00:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
2014-07-07 08:50:48 +00:00
|
|
|
namespace {
|
2015-04-29 15:24:01 +02:00
|
|
|
// Note: If you consider to re-use this class, think twice and instead consider
|
2015-12-04 16:13:05 +01:00
|
|
|
// writing tests that don't depend on the logging system.
|
|
|
|
|
class LogObserver {
|
2014-07-07 08:50:48 +00:00
|
|
|
public:
|
2015-12-04 16:13:05 +01:00
|
|
|
LogObserver() { rtc::LogMessage::AddLogToStream(&callback_, rtc::LS_INFO); }
|
2014-07-07 08:50:48 +00:00
|
|
|
|
2015-12-04 16:13:05 +01:00
|
|
|
~LogObserver() { rtc::LogMessage::RemoveLogToStream(&callback_); }
|
2014-07-07 08:50:48 +00:00
|
|
|
|
2022-05-17 11:48:46 +02:00
|
|
|
void PushExpectedLogLine(absl::string_view expected_log_line) {
|
2014-07-07 08:50:48 +00:00
|
|
|
callback_.PushExpectedLogLine(expected_log_line);
|
|
|
|
|
}
|
|
|
|
|
|
2015-12-10 13:02:50 +01:00
|
|
|
bool Wait() { return callback_.Wait(); }
|
2014-07-07 08:50:48 +00:00
|
|
|
|
|
|
|
|
private:
|
2015-12-04 16:13:05 +01:00
|
|
|
class Callback : public rtc::LogSink {
|
2014-07-07 08:50:48 +00:00
|
|
|
public:
|
2015-12-04 16:13:05 +01:00
|
|
|
void OnLogMessage(const std::string& message) override {
|
2022-03-14 13:32:04 +01:00
|
|
|
OnLogMessage(absl::string_view(message));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void OnLogMessage(absl::string_view message) override {
|
2020-07-06 17:41:35 +02:00
|
|
|
MutexLock lock(&mutex_);
|
2015-12-04 16:13:05 +01:00
|
|
|
// Ignore log lines that are due to missing AST extensions, these are
|
|
|
|
|
// logged when we switch back from AST to TOF until the wrapping bitrate
|
|
|
|
|
// estimator gives up on using AST.
|
2022-03-14 13:32:04 +01:00
|
|
|
if (message.find("BitrateEstimator") != absl::string_view::npos &&
|
|
|
|
|
message.find("packet is missing") == absl::string_view::npos) {
|
|
|
|
|
received_log_lines_.push_back(std::string(message));
|
2014-07-07 08:50:48 +00:00
|
|
|
}
|
2015-12-04 16:13:05 +01:00
|
|
|
|
2014-07-07 08:50:48 +00:00
|
|
|
int num_popped = 0;
|
|
|
|
|
while (!received_log_lines_.empty() && !expected_log_lines_.empty()) {
|
|
|
|
|
std::string a = received_log_lines_.front();
|
|
|
|
|
std::string b = expected_log_lines_.front();
|
|
|
|
|
received_log_lines_.pop_front();
|
|
|
|
|
expected_log_lines_.pop_front();
|
|
|
|
|
num_popped++;
|
2022-03-14 13:32:04 +01:00
|
|
|
EXPECT_TRUE(a.find(b) != absl::string_view::npos) << a << " != " << b;
|
2014-07-07 08:50:48 +00:00
|
|
|
}
|
2019-03-13 18:03:29 -07:00
|
|
|
if (expected_log_lines_.empty()) {
|
2014-07-07 08:50:48 +00:00
|
|
|
if (num_popped > 0) {
|
2015-12-10 13:02:50 +01:00
|
|
|
done_.Set();
|
2014-07-07 08:50:48 +00:00
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-04-25 09:56:49 +02:00
|
|
|
bool Wait() {
|
|
|
|
|
return done_.Wait(test::VideoTestConstants::kDefaultTimeout);
|
|
|
|
|
}
|
2014-07-07 08:50:48 +00:00
|
|
|
|
2022-05-17 11:48:46 +02:00
|
|
|
void PushExpectedLogLine(absl::string_view expected_log_line) {
|
2020-07-06 17:41:35 +02:00
|
|
|
MutexLock lock(&mutex_);
|
2022-05-17 11:48:46 +02:00
|
|
|
expected_log_lines_.emplace_back(expected_log_line);
|
2014-07-07 08:50:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
typedef std::list<std::string> Strings;
|
2020-07-06 17:41:35 +02:00
|
|
|
Mutex mutex_;
|
|
|
|
|
Strings received_log_lines_ RTC_GUARDED_BY(mutex_);
|
|
|
|
|
Strings expected_log_lines_ RTC_GUARDED_BY(mutex_);
|
2015-12-10 13:02:50 +01:00
|
|
|
rtc::Event done_;
|
2014-07-07 08:50:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Callback callback_;
|
|
|
|
|
};
|
|
|
|
|
} // namespace
|
2013-12-16 12:24:44 +00:00
|
|
|
|
|
|
|
|
static const int kTOFExtensionId = 4;
|
|
|
|
|
static const int kASTExtensionId = 5;
|
|
|
|
|
|
2014-06-27 08:47:52 +00:00
|
|
|
class BitrateEstimatorTest : public test::CallTest {
|
2013-12-16 12:24:44 +00:00
|
|
|
public:
|
2016-11-08 03:44:54 -08:00
|
|
|
BitrateEstimatorTest() : receive_config_(nullptr) {}
|
2013-12-16 12:24:44 +00:00
|
|
|
|
2015-11-03 10:15:49 +01:00
|
|
|
virtual ~BitrateEstimatorTest() { EXPECT_TRUE(streams_.empty()); }
|
2013-12-16 12:24:44 +00:00
|
|
|
|
|
|
|
|
virtual void SetUp() {
|
2022-08-11 12:26:09 +02:00
|
|
|
SendTask(task_queue(), [this]() {
|
2023-01-25 15:19:11 +01:00
|
|
|
RegisterRtpExtension(
|
|
|
|
|
RtpExtension(RtpExtension::kTimestampOffsetUri, kTOFExtensionId));
|
|
|
|
|
RegisterRtpExtension(
|
|
|
|
|
RtpExtension(RtpExtension::kAbsSendTimeUri, kASTExtensionId));
|
|
|
|
|
|
2018-07-13 10:43:20 +02:00
|
|
|
CreateCalls();
|
2017-08-22 04:02:52 -07:00
|
|
|
|
2023-01-19 15:45:58 +00:00
|
|
|
CreateSendTransport(BuiltInNetworkBehaviorConfig(), /*observer=*/nullptr);
|
|
|
|
|
CreateReceiveTransport(BuiltInNetworkBehaviorConfig(),
|
|
|
|
|
/*observer=*/nullptr);
|
2017-08-22 04:02:52 -07:00
|
|
|
|
2018-07-13 09:49:00 +02:00
|
|
|
VideoSendStream::Config video_send_config(send_transport_.get());
|
2023-04-25 09:56:49 +02:00
|
|
|
video_send_config.rtp.ssrcs.push_back(
|
|
|
|
|
test::VideoTestConstants::kVideoSendSsrcs[0]);
|
2018-07-13 09:49:00 +02:00
|
|
|
video_send_config.encoder_settings.encoder_factory =
|
2018-04-19 09:04:13 +02:00
|
|
|
&fake_encoder_factory_;
|
2018-11-08 10:02:56 -08:00
|
|
|
video_send_config.encoder_settings.bitrate_allocator_factory =
|
|
|
|
|
bitrate_allocator_factory_.get();
|
2018-07-13 09:49:00 +02:00
|
|
|
video_send_config.rtp.payload_name = "FAKE";
|
2023-04-25 09:56:49 +02:00
|
|
|
video_send_config.rtp.payload_type =
|
|
|
|
|
test::VideoTestConstants::kFakeVideoSendPayloadType;
|
2018-07-13 09:49:00 +02:00
|
|
|
SetVideoSendConfig(video_send_config);
|
|
|
|
|
VideoEncoderConfig video_encoder_config;
|
|
|
|
|
test::FillEncoderConfiguration(kVideoCodecVP8, 1, &video_encoder_config);
|
|
|
|
|
SetVideoEncoderConfig(video_encoder_config);
|
2017-08-22 04:02:52 -07:00
|
|
|
|
2022-05-20 15:21:20 +02:00
|
|
|
receive_config_ =
|
|
|
|
|
VideoReceiveStreamInterface::Config(receive_transport_.get());
|
2017-08-22 04:02:52 -07:00
|
|
|
// receive_config_.decoders will be set by every stream separately.
|
2018-07-13 09:49:00 +02:00
|
|
|
receive_config_.rtp.remote_ssrc = GetVideoSendConfig()->rtp.ssrcs[0];
|
2023-04-25 09:56:49 +02:00
|
|
|
receive_config_.rtp.local_ssrc =
|
|
|
|
|
test::VideoTestConstants::kReceiverLocalVideoSsrc;
|
2017-08-22 04:02:52 -07:00
|
|
|
});
|
2013-12-16 12:24:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual void TearDown() {
|
2022-08-11 12:26:09 +02:00
|
|
|
SendTask(task_queue(), [this]() {
|
2018-05-17 22:01:13 +09:00
|
|
|
for (auto* stream : streams_) {
|
|
|
|
|
stream->StopSending();
|
|
|
|
|
delete stream;
|
2017-08-22 04:02:52 -07:00
|
|
|
}
|
2018-05-17 22:01:13 +09:00
|
|
|
streams_.clear();
|
2018-07-13 10:43:20 +02:00
|
|
|
DestroyCalls();
|
2017-08-22 04:02:52 -07:00
|
|
|
});
|
2013-12-16 12:24:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
friend class Stream;
|
|
|
|
|
|
|
|
|
|
class Stream {
|
|
|
|
|
public:
|
2016-11-08 03:44:54 -08:00
|
|
|
explicit Stream(BitrateEstimatorTest* test)
|
2013-12-16 12:24:44 +00:00
|
|
|
: test_(test),
|
|
|
|
|
is_sending_receiving_(false),
|
2015-03-23 13:12:24 +00:00
|
|
|
send_stream_(nullptr),
|
2013-12-16 12:24:44 +00:00
|
|
|
frame_generator_capturer_(),
|
2018-09-28 09:07:24 +02:00
|
|
|
decoder_factory_(
|
2019-09-17 17:06:18 +02:00
|
|
|
[]() { return std::make_unique<test::FakeDecoder>(); }) {
|
2018-07-13 09:49:00 +02:00
|
|
|
test_->GetVideoSendConfig()->rtp.ssrcs[0]++;
|
2014-06-06 10:49:19 +00:00
|
|
|
send_stream_ = test_->sender_call_->CreateVideoSendStream(
|
2018-07-13 09:49:00 +02:00
|
|
|
test_->GetVideoSendConfig()->Copy(),
|
|
|
|
|
test_->GetVideoEncoderConfig()->Copy());
|
|
|
|
|
RTC_DCHECK_EQ(1, test_->GetVideoEncoderConfig()->number_of_streams);
|
2019-04-18 15:39:53 +02:00
|
|
|
frame_generator_capturer_ =
|
2019-09-17 17:06:18 +02:00
|
|
|
std::make_unique<test::FrameGeneratorCapturer>(
|
2019-04-18 15:39:53 +02:00
|
|
|
test->clock_,
|
2023-04-25 09:56:49 +02:00
|
|
|
test::CreateSquareFrameGenerator(
|
|
|
|
|
test::VideoTestConstants::kDefaultWidth,
|
|
|
|
|
test::VideoTestConstants::kDefaultHeight, absl::nullopt,
|
|
|
|
|
absl::nullopt),
|
|
|
|
|
test::VideoTestConstants::kDefaultFramerate,
|
|
|
|
|
*test->task_queue_factory_);
|
2019-04-18 15:39:53 +02:00
|
|
|
frame_generator_capturer_->Init();
|
2023-06-29 14:56:59 +02:00
|
|
|
frame_generator_capturer_->Start();
|
2018-05-16 14:20:41 -07:00
|
|
|
send_stream_->SetSource(frame_generator_capturer_.get(),
|
|
|
|
|
DegradationPreference::MAINTAIN_FRAMERATE);
|
2014-04-24 11:13:21 +00:00
|
|
|
send_stream_->Start();
|
2013-12-16 12:24:44 +00:00
|
|
|
|
2022-05-20 15:21:20 +02:00
|
|
|
VideoReceiveStreamInterface::Decoder decoder;
|
2020-08-03 15:55:10 +00:00
|
|
|
test_->receive_config_.decoder_factory = &decoder_factory_;
|
2018-07-13 09:49:00 +02:00
|
|
|
decoder.payload_type = test_->GetVideoSendConfig()->rtp.payload_type;
|
2018-09-11 15:56:04 +02:00
|
|
|
decoder.video_format =
|
|
|
|
|
SdpVideoFormat(test_->GetVideoSendConfig()->rtp.payload_name);
|
2016-11-08 03:44:54 -08:00
|
|
|
test_->receive_config_.decoders.clear();
|
|
|
|
|
test_->receive_config_.decoders.push_back(decoder);
|
|
|
|
|
test_->receive_config_.rtp.remote_ssrc =
|
2018-07-13 09:49:00 +02:00
|
|
|
test_->GetVideoSendConfig()->rtp.ssrcs[0];
|
2016-11-08 03:44:54 -08:00
|
|
|
test_->receive_config_.rtp.local_ssrc++;
|
|
|
|
|
test_->receive_config_.renderer = &test->fake_renderer_;
|
|
|
|
|
video_receive_stream_ = test_->receiver_call_->CreateVideoReceiveStream(
|
|
|
|
|
test_->receive_config_.Copy());
|
|
|
|
|
video_receive_stream_->Start();
|
2013-12-16 12:24:44 +00:00
|
|
|
is_sending_receiving_ = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
~Stream() {
|
2015-04-29 15:24:01 +02:00
|
|
|
EXPECT_FALSE(is_sending_receiving_);
|
2016-09-15 09:19:20 -07:00
|
|
|
test_->sender_call_->DestroyVideoSendStream(send_stream_);
|
2016-09-16 07:53:41 -07:00
|
|
|
frame_generator_capturer_.reset(nullptr);
|
2015-03-23 13:12:24 +00:00
|
|
|
send_stream_ = nullptr;
|
2015-04-29 15:24:01 +02:00
|
|
|
if (video_receive_stream_) {
|
|
|
|
|
test_->receiver_call_->DestroyVideoReceiveStream(video_receive_stream_);
|
|
|
|
|
video_receive_stream_ = nullptr;
|
|
|
|
|
}
|
2013-12-16 12:24:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StopSending() {
|
|
|
|
|
if (is_sending_receiving_) {
|
2014-04-24 11:13:21 +00:00
|
|
|
send_stream_->Stop();
|
2015-04-29 15:24:01 +02:00
|
|
|
if (video_receive_stream_) {
|
|
|
|
|
video_receive_stream_->Stop();
|
|
|
|
|
}
|
2013-12-16 12:24:44 +00:00
|
|
|
is_sending_receiving_ = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
BitrateEstimatorTest* test_;
|
|
|
|
|
bool is_sending_receiving_;
|
|
|
|
|
VideoSendStream* send_stream_;
|
2022-05-20 15:21:20 +02:00
|
|
|
VideoReceiveStreamInterface* video_receive_stream_;
|
2016-03-12 06:10:44 -08:00
|
|
|
std::unique_ptr<test::FrameGeneratorCapturer> frame_generator_capturer_;
|
2018-09-28 09:07:24 +02:00
|
|
|
|
|
|
|
|
test::FunctionVideoDecoderFactory decoder_factory_;
|
2013-12-16 12:24:44 +00:00
|
|
|
};
|
|
|
|
|
|
2015-12-04 16:13:05 +01:00
|
|
|
LogObserver receiver_log_;
|
2022-05-20 15:21:20 +02:00
|
|
|
VideoReceiveStreamInterface::Config receive_config_;
|
2013-12-16 12:24:44 +00:00
|
|
|
std::vector<Stream*> streams_;
|
|
|
|
|
};
|
|
|
|
|
|
2015-07-06 10:50:47 +02:00
|
|
|
static const char* kAbsSendTimeLog =
|
|
|
|
|
"RemoteBitrateEstimatorAbsSendTime: Instantiating.";
|
|
|
|
|
static const char* kSingleStreamLog =
|
|
|
|
|
"RemoteBitrateEstimatorSingleStream: Instantiating.";
|
|
|
|
|
|
2015-04-29 15:24:01 +02:00
|
|
|
TEST_F(BitrateEstimatorTest, InstantiatesTOFPerDefaultForVideo) {
|
2022-08-11 12:26:09 +02:00
|
|
|
SendTask(task_queue(), [this]() {
|
2018-07-13 09:49:00 +02:00
|
|
|
GetVideoSendConfig()->rtp.extensions.push_back(
|
2017-08-22 04:02:52 -07:00
|
|
|
RtpExtension(RtpExtension::kTimestampOffsetUri, kTOFExtensionId));
|
|
|
|
|
receiver_log_.PushExpectedLogLine(kSingleStreamLog);
|
|
|
|
|
receiver_log_.PushExpectedLogLine(kSingleStreamLog);
|
|
|
|
|
streams_.push_back(new Stream(this));
|
|
|
|
|
});
|
2015-12-10 13:02:50 +01:00
|
|
|
EXPECT_TRUE(receiver_log_.Wait());
|
2013-12-16 12:24:44 +00:00
|
|
|
}
|
|
|
|
|
|
2015-04-29 15:24:01 +02:00
|
|
|
TEST_F(BitrateEstimatorTest, ImmediatelySwitchToASTForVideo) {
|
2022-08-11 12:26:09 +02:00
|
|
|
SendTask(task_queue(), [this]() {
|
2018-07-13 09:49:00 +02:00
|
|
|
GetVideoSendConfig()->rtp.extensions.push_back(
|
2017-08-22 04:02:52 -07:00
|
|
|
RtpExtension(RtpExtension::kAbsSendTimeUri, kASTExtensionId));
|
|
|
|
|
receiver_log_.PushExpectedLogLine(kSingleStreamLog);
|
|
|
|
|
receiver_log_.PushExpectedLogLine(kSingleStreamLog);
|
|
|
|
|
receiver_log_.PushExpectedLogLine("Switching to absolute send time RBE.");
|
|
|
|
|
receiver_log_.PushExpectedLogLine(kAbsSendTimeLog);
|
|
|
|
|
streams_.push_back(new Stream(this));
|
|
|
|
|
});
|
2015-12-10 13:02:50 +01:00
|
|
|
EXPECT_TRUE(receiver_log_.Wait());
|
2015-04-29 15:24:01 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TEST_F(BitrateEstimatorTest, SwitchesToASTForVideo) {
|
2022-08-11 12:26:09 +02:00
|
|
|
SendTask(task_queue(), [this]() {
|
2018-07-13 09:49:00 +02:00
|
|
|
GetVideoSendConfig()->rtp.extensions.push_back(
|
2017-08-22 04:02:52 -07:00
|
|
|
RtpExtension(RtpExtension::kTimestampOffsetUri, kTOFExtensionId));
|
|
|
|
|
receiver_log_.PushExpectedLogLine(kSingleStreamLog);
|
|
|
|
|
receiver_log_.PushExpectedLogLine(kSingleStreamLog);
|
|
|
|
|
streams_.push_back(new Stream(this));
|
|
|
|
|
});
|
2015-12-10 13:02:50 +01:00
|
|
|
EXPECT_TRUE(receiver_log_.Wait());
|
2013-12-16 12:24:44 +00:00
|
|
|
|
2022-08-11 12:26:09 +02:00
|
|
|
SendTask(task_queue(), [this]() {
|
2018-07-13 09:49:00 +02:00
|
|
|
GetVideoSendConfig()->rtp.extensions[0] =
|
2017-08-22 04:02:52 -07:00
|
|
|
RtpExtension(RtpExtension::kAbsSendTimeUri, kASTExtensionId);
|
|
|
|
|
receiver_log_.PushExpectedLogLine("Switching to absolute send time RBE.");
|
|
|
|
|
receiver_log_.PushExpectedLogLine(kAbsSendTimeLog);
|
|
|
|
|
streams_.push_back(new Stream(this));
|
|
|
|
|
});
|
2015-12-10 13:02:50 +01:00
|
|
|
EXPECT_TRUE(receiver_log_.Wait());
|
2013-12-16 12:24:44 +00:00
|
|
|
}
|
|
|
|
|
|
2016-04-22 10:52:40 -07:00
|
|
|
// This test is flaky. See webrtc:5790.
|
|
|
|
|
TEST_F(BitrateEstimatorTest, DISABLED_SwitchesToASTThenBackToTOFForVideo) {
|
2022-08-11 12:26:09 +02:00
|
|
|
SendTask(task_queue(), [this]() {
|
2018-07-13 09:49:00 +02:00
|
|
|
GetVideoSendConfig()->rtp.extensions.push_back(
|
2017-08-22 04:02:52 -07:00
|
|
|
RtpExtension(RtpExtension::kTimestampOffsetUri, kTOFExtensionId));
|
|
|
|
|
receiver_log_.PushExpectedLogLine(kSingleStreamLog);
|
|
|
|
|
receiver_log_.PushExpectedLogLine(kAbsSendTimeLog);
|
|
|
|
|
receiver_log_.PushExpectedLogLine(kSingleStreamLog);
|
|
|
|
|
streams_.push_back(new Stream(this));
|
|
|
|
|
});
|
2015-12-10 13:02:50 +01:00
|
|
|
EXPECT_TRUE(receiver_log_.Wait());
|
2013-12-16 12:24:44 +00:00
|
|
|
|
2022-08-11 12:26:09 +02:00
|
|
|
SendTask(task_queue(), [this]() {
|
2018-07-13 09:49:00 +02:00
|
|
|
GetVideoSendConfig()->rtp.extensions[0] =
|
2017-08-22 04:02:52 -07:00
|
|
|
RtpExtension(RtpExtension::kAbsSendTimeUri, kASTExtensionId);
|
|
|
|
|
receiver_log_.PushExpectedLogLine(kAbsSendTimeLog);
|
|
|
|
|
receiver_log_.PushExpectedLogLine("Switching to absolute send time RBE.");
|
|
|
|
|
streams_.push_back(new Stream(this));
|
|
|
|
|
});
|
2015-12-10 13:02:50 +01:00
|
|
|
EXPECT_TRUE(receiver_log_.Wait());
|
2013-12-16 12:24:44 +00:00
|
|
|
|
2022-08-11 12:26:09 +02:00
|
|
|
SendTask(task_queue(), [this]() {
|
2018-07-13 09:49:00 +02:00
|
|
|
GetVideoSendConfig()->rtp.extensions[0] =
|
2017-08-22 04:02:52 -07:00
|
|
|
RtpExtension(RtpExtension::kTimestampOffsetUri, kTOFExtensionId);
|
|
|
|
|
receiver_log_.PushExpectedLogLine(kAbsSendTimeLog);
|
|
|
|
|
receiver_log_.PushExpectedLogLine(
|
|
|
|
|
"WrappingBitrateEstimator: Switching to transmission time offset RBE.");
|
|
|
|
|
streams_.push_back(new Stream(this));
|
|
|
|
|
streams_[0]->StopSending();
|
|
|
|
|
streams_[1]->StopSending();
|
|
|
|
|
});
|
2015-12-10 13:02:50 +01:00
|
|
|
EXPECT_TRUE(receiver_log_.Wait());
|
2013-12-16 12:24:44 +00:00
|
|
|
}
|
|
|
|
|
} // namespace webrtc
|