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

Side by Side Diff: webrtc/media/engine/fakewebrtccall.h

Issue 2304363002: Let ViEEncoder express resolution requests as Sinkwants (Closed)
Patch Set: Rebased. Created 4 years, 1 month 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/media/base/mediachannel.h ('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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 int GetLastHeight() const; 120 int GetLastHeight() const;
121 int64_t GetLastTimestamp() const; 121 int64_t GetLastTimestamp() const;
122 void SetStats(const webrtc::VideoSendStream::Stats& stats); 122 void SetStats(const webrtc::VideoSendStream::Stats& stats);
123 int num_encoder_reconfigurations() const { 123 int num_encoder_reconfigurations() const {
124 return num_encoder_reconfigurations_; 124 return num_encoder_reconfigurations_;
125 } 125 }
126 126
127 void EnableEncodedFrameRecording(const std::vector<rtc::PlatformFile>& files, 127 void EnableEncodedFrameRecording(const std::vector<rtc::PlatformFile>& files,
128 size_t byte_limit) override; 128 size_t byte_limit) override;
129 129
130 bool resolution_scaling_enabled() const {
131 return resolution_scaling_enabled_;
132 }
133 void InjectVideoSinkWants(const rtc::VideoSinkWants& wants);
134
135 rtc::VideoSourceInterface<webrtc::VideoFrame>* source() const {
136 return source_;
137 }
138
130 private: 139 private:
131 // rtc::VideoSinkInterface<VideoFrame> implementation. 140 // rtc::VideoSinkInterface<VideoFrame> implementation.
132 void OnFrame(const webrtc::VideoFrame& frame) override; 141 void OnFrame(const webrtc::VideoFrame& frame) override;
133 142
134 // webrtc::VideoSendStream implementation. 143 // webrtc::VideoSendStream implementation.
135 void Start() override; 144 void Start() override;
136 void Stop() override; 145 void Stop() override;
137 void SetSource( 146 void SetSource(rtc::VideoSourceInterface<webrtc::VideoFrame>* source,
138 rtc::VideoSourceInterface<webrtc::VideoFrame>* source) override; 147 const webrtc::VideoSendStream::DegradationPreference&
148 degradation_preference) override;
139 webrtc::VideoSendStream::Stats GetStats() override; 149 webrtc::VideoSendStream::Stats GetStats() override;
140 void ReconfigureVideoEncoder(webrtc::VideoEncoderConfig config) override; 150 void ReconfigureVideoEncoder(webrtc::VideoEncoderConfig config) override;
141 151
142 bool sending_; 152 bool sending_;
143 webrtc::VideoSendStream::Config config_; 153 webrtc::VideoSendStream::Config config_;
144 webrtc::VideoEncoderConfig encoder_config_; 154 webrtc::VideoEncoderConfig encoder_config_;
145 std::vector<webrtc::VideoStream> video_streams_; 155 std::vector<webrtc::VideoStream> video_streams_;
156 rtc::VideoSinkWants sink_wants_;
157
146 bool codec_settings_set_; 158 bool codec_settings_set_;
147 union VpxSettings { 159 union VpxSettings {
148 webrtc::VideoCodecVP8 vp8; 160 webrtc::VideoCodecVP8 vp8;
149 webrtc::VideoCodecVP9 vp9; 161 webrtc::VideoCodecVP9 vp9;
150 } vpx_settings_; 162 } vpx_settings_;
163 bool resolution_scaling_enabled_;
151 rtc::VideoSourceInterface<webrtc::VideoFrame>* source_; 164 rtc::VideoSourceInterface<webrtc::VideoFrame>* source_;
152 int num_swapped_frames_; 165 int num_swapped_frames_;
153 webrtc::VideoFrame last_frame_; 166 webrtc::VideoFrame last_frame_;
154 webrtc::VideoSendStream::Stats stats_; 167 webrtc::VideoSendStream::Stats stats_;
155 int num_encoder_reconfigurations_ = 0; 168 int num_encoder_reconfigurations_ = 0;
156 }; 169 };
157 170
158 class FakeVideoReceiveStream final : public webrtc::VideoReceiveStream { 171 class FakeVideoReceiveStream final : public webrtc::VideoReceiveStream {
159 public: 172 public:
160 explicit FakeVideoReceiveStream(webrtc::VideoReceiveStream::Config config); 173 explicit FakeVideoReceiveStream(webrtc::VideoReceiveStream::Config config);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 std::vector<FakeAudioSendStream*> audio_send_streams_; 274 std::vector<FakeAudioSendStream*> audio_send_streams_;
262 std::vector<FakeVideoReceiveStream*> video_receive_streams_; 275 std::vector<FakeVideoReceiveStream*> video_receive_streams_;
263 std::vector<FakeAudioReceiveStream*> audio_receive_streams_; 276 std::vector<FakeAudioReceiveStream*> audio_receive_streams_;
264 277
265 int num_created_send_streams_; 278 int num_created_send_streams_;
266 int num_created_receive_streams_; 279 int num_created_receive_streams_;
267 }; 280 };
268 281
269 } // namespace cricket 282 } // namespace cricket
270 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_ 283 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_
OLDNEW
« no previous file with comments | « webrtc/media/base/mediachannel.h ('k') | webrtc/media/engine/fakewebrtccall.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698