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

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

Issue 2250123002: Reland of Add task queue to Call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased 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
« no previous file with comments | « webrtc/media/engine/fakewebrtccall.h ('k') | webrtc/media/engine/webrtcvideoengine2.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/fakewebrtccall.cc
diff --git a/webrtc/media/engine/fakewebrtccall.cc b/webrtc/media/engine/fakewebrtccall.cc
index d0655cf3b0eccd40736cbcced40d84ea9336aef5..cb904df66fdcf1275bf722ddb6220968bd0bd8ab 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;
« no previous file with comments | « webrtc/media/engine/fakewebrtccall.h ('k') | webrtc/media/engine/webrtcvideoengine2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698