Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(846)

Unified Diff: webrtc/media/engine/fakewebrtccall.cc

Issue 2060403002: Add task queue to Call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@move_getpadding
Patch Set: Fix audio thread check when adding audio to bitrateallocator. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/media/engine/fakewebrtccall.cc
diff --git a/webrtc/media/engine/fakewebrtccall.cc b/webrtc/media/engine/fakewebrtccall.cc
index fdf7cf36fc4bb678d09d9dc6a66c00a2c24a9d8f..193831598c2f6a6e52126fafea41384bf0c7d7df 100644
--- a/webrtc/media/engine/fakewebrtccall.cc
+++ b/webrtc/media/engine/fakewebrtccall.cc
@@ -98,21 +98,22 @@ void FakeAudioReceiveStream::SetGain(float gain) {
}
FakeVideoSendStream::FakeVideoSendStream(
- const webrtc::VideoSendStream::Config& config,
- const webrtc::VideoEncoderConfig& encoder_config)
+ webrtc::VideoSendStream::Config config,
+ webrtc::VideoEncoderConfig encoder_config)
: sending_(false),
- config_(config),
+ config_(std::move(config)),
codec_settings_set_(false),
num_swapped_frames_(0) {
RTC_DCHECK(config.encoder_settings.encoder != NULL);
- ReconfigureVideoEncoder(encoder_config);
+ ReconfigureVideoEncoder(std::move(encoder_config));
}
-webrtc::VideoSendStream::Config FakeVideoSendStream::GetConfig() const {
+const webrtc::VideoSendStream::Config& FakeVideoSendStream::GetConfig() const {
return config_;
}
-webrtc::VideoEncoderConfig FakeVideoSendStream::GetEncoderConfig() const {
+const webrtc::VideoEncoderConfig& FakeVideoSendStream::GetEncoderConfig()
+ const {
return encoder_config_;
}
@@ -177,8 +178,7 @@ webrtc::VideoSendStream::Stats FakeVideoSendStream::GetStats() {
}
void FakeVideoSendStream::ReconfigureVideoEncoder(
- const webrtc::VideoEncoderConfig& config) {
- encoder_config_ = config;
+ webrtc::VideoEncoderConfig config) {
if (config.encoder_specific_settings != NULL) {
if (config_.encoder_settings.payload_name == "VP8") {
vpx_settings_.vp8 = *reinterpret_cast<const webrtc::VideoCodecVP8*>(
@@ -199,6 +199,7 @@ void FakeVideoSendStream::ReconfigureVideoEncoder(
<< config_.encoder_settings.payload_name;
}
}
+ encoder_config_ = std::move(config);
codec_settings_set_ = config.encoder_specific_settings != NULL;
++num_encoder_reconfigurations_;
}
@@ -359,10 +360,10 @@ void FakeCall::DestroyAudioReceiveStream(
}
webrtc::VideoSendStream* FakeCall::CreateVideoSendStream(
- const webrtc::VideoSendStream::Config& config,
- const webrtc::VideoEncoderConfig& encoder_config) {
+ webrtc::VideoSendStream::Config config,
+ webrtc::VideoEncoderConfig encoder_config) {
FakeVideoSendStream* fake_stream =
- new FakeVideoSendStream(config, encoder_config);
+ new FakeVideoSendStream(std::move(config), std::move(encoder_config));
video_send_streams_.push_back(fake_stream);
++num_created_send_streams_;
return fake_stream;

Powered by Google App Engine
This is Rietveld 408576698