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

Unified Diff: webrtc/video_receive_stream.h

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/video/video_receive_stream.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video_receive_stream.h
diff --git a/webrtc/video_receive_stream.h b/webrtc/video_receive_stream.h
index f8e9888eda412d5f387b5c601ca3d4b27af8bb0c..410d5aff7f62adcec88ab455b79de43cd9b64303 100644
--- a/webrtc/video_receive_stream.h
+++ b/webrtc/video_receive_stream.h
@@ -76,10 +76,23 @@ class VideoReceiveStream {
};
struct Config {
+ private:
+ // Access to the copy constructor is private to force use of the Copy()
+ // method for those exceptional cases where we do use it.
+ Config(const Config&) = default;
+
+ public:
Config() = delete;
+ Config(Config&&) = default;
explicit Config(Transport* rtcp_send_transport)
: rtcp_send_transport(rtcp_send_transport) {}
+ Config& operator=(Config&&) = default;
+ Config& operator=(const Config&) = delete;
+
+ // Mostly used by tests. Avoid creating copies if you can.
+ Config Copy() const { return Config(*this); }
+
std::string ToString() const;
// Decoders for every payload that we can receive.
« no previous file with comments | « webrtc/video/video_receive_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698