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

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

Issue 2042603002: Movable support for VideoReceiveStream::Config and avoid copies (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add TODO Created 4 years, 6 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 e9edf27bcb66bf9a3378a325fe9a5e37ae234dfc..41b34750e71e873f434d2be068dc262c7f89a3e3 100644
--- a/webrtc/media/engine/fakewebrtccall.cc
+++ b/webrtc/media/engine/fakewebrtccall.cc
@@ -208,11 +208,10 @@ void FakeVideoSendStream::Stop() {
}
FakeVideoReceiveStream::FakeVideoReceiveStream(
- const webrtc::VideoReceiveStream::Config& config)
- : config_(config), receiving_(false) {
-}
+ webrtc::VideoReceiveStream::Config config)
+ : config_(std::move(config)), receiving_(false) {}
-webrtc::VideoReceiveStream::Config FakeVideoReceiveStream::GetConfig() {
+const webrtc::VideoReceiveStream::Config& FakeVideoReceiveStream::GetConfig() {
return config_;
}
@@ -374,8 +373,9 @@ void FakeCall::DestroyVideoSendStream(webrtc::VideoSendStream* send_stream) {
}
webrtc::VideoReceiveStream* FakeCall::CreateVideoReceiveStream(
- const webrtc::VideoReceiveStream::Config& config) {
- video_receive_streams_.push_back(new FakeVideoReceiveStream(config));
+ webrtc::VideoReceiveStream::Config config) {
+ video_receive_streams_.push_back(
+ new FakeVideoReceiveStream(std::move(config)));
++num_created_receive_streams_;
return video_receive_streams_.back();
}
« 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