| 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 |
| 11 // Declaration of abstract class VideoCapturer | 11 // Declaration of abstract class VideoCapturer |
| 12 | 12 |
| 13 #ifndef WEBRTC_MEDIA_BASE_VIDEOCAPTURER_H_ | 13 #ifndef WEBRTC_MEDIA_BASE_VIDEOCAPTURER_H_ |
| 14 #define WEBRTC_MEDIA_BASE_VIDEOCAPTURER_H_ | 14 #define WEBRTC_MEDIA_BASE_VIDEOCAPTURER_H_ |
| 15 | 15 |
| 16 #include <algorithm> | 16 #include <algorithm> |
| 17 #include <memory> |
| 17 #include <string> | 18 #include <string> |
| 18 #include <vector> | 19 #include <vector> |
| 19 | 20 |
| 20 #include "webrtc/base/basictypes.h" | 21 #include "webrtc/base/basictypes.h" |
| 21 #include "webrtc/base/criticalsection.h" | 22 #include "webrtc/base/criticalsection.h" |
| 22 #include "webrtc/media/base/videosourceinterface.h" | 23 #include "webrtc/media/base/videosourceinterface.h" |
| 23 #include "webrtc/base/messagehandler.h" | 24 #include "webrtc/base/messagehandler.h" |
| 24 #include "webrtc/base/rollingaccumulator.h" | 25 #include "webrtc/base/rollingaccumulator.h" |
| 25 #include "webrtc/base/scoped_ptr.h" | |
| 26 #include "webrtc/base/sigslot.h" | 26 #include "webrtc/base/sigslot.h" |
| 27 #include "webrtc/base/thread.h" | 27 #include "webrtc/base/thread.h" |
| 28 #include "webrtc/base/timing.h" | 28 #include "webrtc/base/timing.h" |
| 29 #include "webrtc/media/base/mediachannel.h" | 29 #include "webrtc/media/base/mediachannel.h" |
| 30 #include "webrtc/media/base/videoadapter.h" | 30 #include "webrtc/media/base/videoadapter.h" |
| 31 #include "webrtc/media/base/videobroadcaster.h" | 31 #include "webrtc/media/base/videobroadcaster.h" |
| 32 #include "webrtc/media/base/videocommon.h" | 32 #include "webrtc/media/base/videocommon.h" |
| 33 #include "webrtc/media/base/videoframefactory.h" | 33 #include "webrtc/media/base/videoframefactory.h" |
| 34 #include "webrtc/media/devices/devicemanager.h" | 34 #include "webrtc/media/devices/devicemanager.h" |
| 35 | 35 |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 // Helper function to save statistics on the current data from a | 335 // Helper function to save statistics on the current data from a |
| 336 // RollingAccumulator into stats. | 336 // RollingAccumulator into stats. |
| 337 template<class T> | 337 template<class T> |
| 338 static void GetVariableSnapshot( | 338 static void GetVariableSnapshot( |
| 339 const rtc::RollingAccumulator<T>& data, | 339 const rtc::RollingAccumulator<T>& data, |
| 340 VariableInfo<T>* stats); | 340 VariableInfo<T>* stats); |
| 341 | 341 |
| 342 rtc::Thread* thread_; | 342 rtc::Thread* thread_; |
| 343 std::string id_; | 343 std::string id_; |
| 344 CaptureState capture_state_; | 344 CaptureState capture_state_; |
| 345 rtc::scoped_ptr<VideoFrameFactory> frame_factory_; | 345 std::unique_ptr<VideoFrameFactory> frame_factory_; |
| 346 rtc::scoped_ptr<VideoFormat> capture_format_; | 346 std::unique_ptr<VideoFormat> capture_format_; |
| 347 std::vector<VideoFormat> supported_formats_; | 347 std::vector<VideoFormat> supported_formats_; |
| 348 rtc::scoped_ptr<VideoFormat> max_format_; | 348 std::unique_ptr<VideoFormat> max_format_; |
| 349 std::vector<VideoFormat> filtered_supported_formats_; | 349 std::vector<VideoFormat> filtered_supported_formats_; |
| 350 | 350 |
| 351 int ratio_w_; // View resolution. e.g. 1280 x 720. | 351 int ratio_w_; // View resolution. e.g. 1280 x 720. |
| 352 int ratio_h_; | 352 int ratio_h_; |
| 353 bool enable_camera_list_; | 353 bool enable_camera_list_; |
| 354 bool square_pixel_aspect_ratio_; // Enable scaling to square pixels. | 354 bool square_pixel_aspect_ratio_; // Enable scaling to square pixels. |
| 355 int scaled_width_; // Current output size from ComputeScale. | 355 int scaled_width_; // Current output size from ComputeScale. |
| 356 int scaled_height_; | 356 int scaled_height_; |
| 357 bool muted_; | 357 bool muted_; |
| 358 int black_frame_count_down_; | 358 int black_frame_count_down_; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 373 | 373 |
| 374 // Whether capturer should apply rotation to the frame before signaling it. | 374 // Whether capturer should apply rotation to the frame before signaling it. |
| 375 bool apply_rotation_; | 375 bool apply_rotation_; |
| 376 | 376 |
| 377 RTC_DISALLOW_COPY_AND_ASSIGN(VideoCapturer); | 377 RTC_DISALLOW_COPY_AND_ASSIGN(VideoCapturer); |
| 378 }; | 378 }; |
| 379 | 379 |
| 380 } // namespace cricket | 380 } // namespace cricket |
| 381 | 381 |
| 382 #endif // WEBRTC_MEDIA_BASE_VIDEOCAPTURER_H_ | 382 #endif // WEBRTC_MEDIA_BASE_VIDEOCAPTURER_H_ |
| OLD | NEW |