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

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: Address comments 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
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // TODO(pbos): Add info on currently-received codec to Stats. 198 // TODO(pbos): Add info on currently-received codec to Stats.
186 virtual Stats GetStats() const = 0; 199 virtual Stats GetStats() const = 0;
187 200
188 protected: 201 protected:
189 virtual ~VideoReceiveStream() {} 202 virtual ~VideoReceiveStream() {}
190 }; 203 };
191 204
192 } // namespace webrtc 205 } // namespace webrtc
193 206
194 #endif // WEBRTC_VIDEO_RECEIVE_STREAM_H_ 207 #endif // WEBRTC_VIDEO_RECEIVE_STREAM_H_
OLDNEW
« webrtc/video/receive_statistics_proxy.cc ('K') | « webrtc/video/video_receive_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698