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

Side by Side Diff: webrtc/media/engine/fakewebrtccall.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/call/call.cc ('k') | webrtc/media/engine/fakewebrtccall.cc » ('j') | 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 webrtc::VideoCodecVP9 vp9; 133 webrtc::VideoCodecVP9 vp9;
134 } vpx_settings_; 134 } vpx_settings_;
135 int num_swapped_frames_; 135 int num_swapped_frames_;
136 webrtc::VideoFrame last_frame_; 136 webrtc::VideoFrame last_frame_;
137 webrtc::VideoSendStream::Stats stats_; 137 webrtc::VideoSendStream::Stats stats_;
138 int num_encoder_reconfigurations_ = 0; 138 int num_encoder_reconfigurations_ = 0;
139 }; 139 };
140 140
141 class FakeVideoReceiveStream final : public webrtc::VideoReceiveStream { 141 class FakeVideoReceiveStream final : public webrtc::VideoReceiveStream {
142 public: 142 public:
143 explicit FakeVideoReceiveStream( 143 explicit FakeVideoReceiveStream(webrtc::VideoReceiveStream::Config config);
144 const webrtc::VideoReceiveStream::Config& config);
145 144
146 webrtc::VideoReceiveStream::Config GetConfig(); 145 const webrtc::VideoReceiveStream::Config& GetConfig();
147 146
148 bool IsReceiving() const; 147 bool IsReceiving() const;
149 148
150 void InjectFrame(const webrtc::VideoFrame& frame); 149 void InjectFrame(const webrtc::VideoFrame& frame);
151 150
152 void SetStats(const webrtc::VideoReceiveStream::Stats& stats); 151 void SetStats(const webrtc::VideoReceiveStream::Stats& stats);
153 152
154 private: 153 private:
155 // webrtc::VideoReceiveStream implementation. 154 // webrtc::VideoReceiveStream implementation.
156 void Start() override; 155 void Start() override;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 const webrtc::AudioReceiveStream::Config& config) override; 191 const webrtc::AudioReceiveStream::Config& config) override;
193 void DestroyAudioReceiveStream( 192 void DestroyAudioReceiveStream(
194 webrtc::AudioReceiveStream* receive_stream) override; 193 webrtc::AudioReceiveStream* receive_stream) override;
195 194
196 webrtc::VideoSendStream* CreateVideoSendStream( 195 webrtc::VideoSendStream* CreateVideoSendStream(
197 const webrtc::VideoSendStream::Config& config, 196 const webrtc::VideoSendStream::Config& config,
198 const webrtc::VideoEncoderConfig& encoder_config) override; 197 const webrtc::VideoEncoderConfig& encoder_config) override;
199 void DestroyVideoSendStream(webrtc::VideoSendStream* send_stream) override; 198 void DestroyVideoSendStream(webrtc::VideoSendStream* send_stream) override;
200 199
201 webrtc::VideoReceiveStream* CreateVideoReceiveStream( 200 webrtc::VideoReceiveStream* CreateVideoReceiveStream(
202 const webrtc::VideoReceiveStream::Config& config) override; 201 webrtc::VideoReceiveStream::Config config) override;
203 void DestroyVideoReceiveStream( 202 void DestroyVideoReceiveStream(
204 webrtc::VideoReceiveStream* receive_stream) override; 203 webrtc::VideoReceiveStream* receive_stream) override;
205 webrtc::PacketReceiver* Receiver() override; 204 webrtc::PacketReceiver* Receiver() override;
206 205
207 DeliveryStatus DeliverPacket(webrtc::MediaType media_type, 206 DeliveryStatus DeliverPacket(webrtc::MediaType media_type,
208 const uint8_t* packet, 207 const uint8_t* packet,
209 size_t length, 208 size_t length,
210 const webrtc::PacketTime& packet_time) override; 209 const webrtc::PacketTime& packet_time) override;
211 210
212 webrtc::Call::Stats GetStats() const override; 211 webrtc::Call::Stats GetStats() const override;
(...skipping 15 matching lines...) Expand all
228 std::vector<FakeAudioSendStream*> audio_send_streams_; 227 std::vector<FakeAudioSendStream*> audio_send_streams_;
229 std::vector<FakeVideoReceiveStream*> video_receive_streams_; 228 std::vector<FakeVideoReceiveStream*> video_receive_streams_;
230 std::vector<FakeAudioReceiveStream*> audio_receive_streams_; 229 std::vector<FakeAudioReceiveStream*> audio_receive_streams_;
231 230
232 int num_created_send_streams_; 231 int num_created_send_streams_;
233 int num_created_receive_streams_; 232 int num_created_receive_streams_;
234 }; 233 };
235 234
236 } // namespace cricket 235 } // namespace cricket
237 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_UNITTEST_H_ 236 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_UNITTEST_H_
OLDNEW
« no previous file with comments | « webrtc/call/call.cc ('k') | webrtc/media/engine/fakewebrtccall.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698