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

Side by Side Diff: webrtc/media/base/videocapturer.h

Issue 1982983003: VideoAdapter: Drop frames based on actual fps instead of expected fps (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add jitter test Created 4 years, 7 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/media/base/videoadapter_unittest.cc ('k') | webrtc/media/base/videocapturer.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) 2010 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2010 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 // order of preference, that are expected by the media engine. 239 // order of preference, that are expected by the media engine.
240 virtual bool GetPreferredFourccs(std::vector<uint32_t>* fourccs) = 0; 240 virtual bool GetPreferredFourccs(std::vector<uint32_t>* fourccs) = 0;
241 241
242 // mutators to set private attributes 242 // mutators to set private attributes
243 void SetId(const std::string& id) { 243 void SetId(const std::string& id) {
244 id_ = id; 244 id_ = id;
245 } 245 }
246 246
247 void SetCaptureFormat(const VideoFormat* format) { 247 void SetCaptureFormat(const VideoFormat* format) {
248 capture_format_.reset(format ? new VideoFormat(*format) : NULL); 248 capture_format_.reset(format ? new VideoFormat(*format) : NULL);
249 if (capture_format_) {
250 ASSERT(capture_format_->interval > 0 &&
251 "Capture format expected to have positive interval.");
252 video_adapter_.SetExpectedInputFrameInterval(capture_format_->interval);
253 }
254 } 249 }
255 250
256 void SetSupportedFormats(const std::vector<VideoFormat>& formats); 251 void SetSupportedFormats(const std::vector<VideoFormat>& formats);
257 VideoFrameFactory* frame_factory() { return frame_factory_.get(); } 252 VideoFrameFactory* frame_factory() { return frame_factory_.get(); }
258 253
259 private: 254 private:
260 void Construct(); 255 void Construct();
261 // Get the distance between the desired format and the supported format. 256 // Get the distance between the desired format and the supported format.
262 // Return the max distance if they mismatch. See the implementation for 257 // Return the max distance if they mismatch. See the implementation for
263 // details. 258 // details.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 295
301 // Whether capturer should apply rotation to the frame before signaling it. 296 // Whether capturer should apply rotation to the frame before signaling it.
302 bool apply_rotation_; 297 bool apply_rotation_;
303 298
304 RTC_DISALLOW_COPY_AND_ASSIGN(VideoCapturer); 299 RTC_DISALLOW_COPY_AND_ASSIGN(VideoCapturer);
305 }; 300 };
306 301
307 } // namespace cricket 302 } // namespace cricket
308 303
309 #endif // WEBRTC_MEDIA_BASE_VIDEOCAPTURER_H_ 304 #endif // WEBRTC_MEDIA_BASE_VIDEOCAPTURER_H_
OLDNEW
« no previous file with comments | « webrtc/media/base/videoadapter_unittest.cc ('k') | webrtc/media/base/videocapturer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698