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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « webrtc/video/video_receive_stream.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 int sync_offset_ms = std::numeric_limits<int>::max(); 69 int sync_offset_ms = std::numeric_limits<int>::max();
70 70
71 uint32_t ssrc = 0; 71 uint32_t ssrc = 0;
72 std::string c_name; 72 std::string c_name;
73 StreamDataCounters rtp_stats; 73 StreamDataCounters rtp_stats;
74 RtcpPacketTypeCounter rtcp_packet_type_counts; 74 RtcpPacketTypeCounter rtcp_packet_type_counts;
75 RtcpStatistics rtcp_stats; 75 RtcpStatistics rtcp_stats;
76 }; 76 };
77 77
78 struct Config { 78 struct Config {
79 private:
80 // Access to the copy constructor is private to force use of the Copy()
81 // method for those exceptional cases where we do use it.
82 Config(const Config&) = default;
83
84 public:
79 Config() = delete; 85 Config() = delete;
86 Config(Config&&) = default;
80 explicit Config(Transport* rtcp_send_transport) 87 explicit Config(Transport* rtcp_send_transport)
81 : rtcp_send_transport(rtcp_send_transport) {} 88 : rtcp_send_transport(rtcp_send_transport) {}
82 89
90 Config& operator=(Config&&) = default;
91 Config& operator=(const Config&) = delete;
92
93 // Mostly used by tests. Avoid creating copies if you can.
94 Config Copy() const { return Config(*this); }
95
83 std::string ToString() const; 96 std::string ToString() const;
84 97
85 // Decoders for every payload that we can receive. 98 // Decoders for every payload that we can receive.
86 std::vector<Decoder> decoders; 99 std::vector<Decoder> decoders;
87 100
88 // Receive-stream specific RTP settings. 101 // Receive-stream specific RTP settings.
89 struct Rtp { 102 struct Rtp {
90 std::string ToString() const; 103 std::string ToString() const;
91 104
92 // Synchronization source (stream identifier) to be received. 105 // Synchronization source (stream identifier) to be received.
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 // TODO(pbos): Add info on currently-received codec to Stats. 201 // TODO(pbos): Add info on currently-received codec to Stats.
189 virtual Stats GetStats() const = 0; 202 virtual Stats GetStats() const = 0;
190 203
191 protected: 204 protected:
192 virtual ~VideoReceiveStream() {} 205 virtual ~VideoReceiveStream() {}
193 }; 206 };
194 207
195 } // namespace webrtc 208 } // namespace webrtc
196 209
197 #endif // WEBRTC_VIDEO_RECEIVE_STREAM_H_ 210 #endif // WEBRTC_VIDEO_RECEIVE_STREAM_H_
OLDNEW
« 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