OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |