| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 int32_t CaptureSettings(VideoCaptureCapability& /*settings*/) override | 87 int32_t CaptureSettings(VideoCaptureCapability& /*settings*/) override |
| 88 { return -1; } | 88 { return -1; } |
| 89 | 89 |
| 90 protected: | 90 protected: |
| 91 VideoCaptureImpl(); | 91 VideoCaptureImpl(); |
| 92 virtual ~VideoCaptureImpl(); | 92 virtual ~VideoCaptureImpl(); |
| 93 int32_t DeliverCapturedFrame(VideoFrame& captureFrame); | 93 int32_t DeliverCapturedFrame(VideoFrame& captureFrame); |
| 94 | 94 |
| 95 char* _deviceUniqueId; // current Device unique name; | 95 char* _deviceUniqueId; // current Device unique name; |
| 96 CriticalSectionWrapper& _apiCs; | 96 CriticalSectionWrapper& _apiCs; |
| 97 int32_t _captureDelay; // Current capture delay. May be changed of platform
dependent parts. | |
| 98 VideoCaptureCapability _requestedCapability; // Should be set by platform de
pendent code in StartCapture. | 97 VideoCaptureCapability _requestedCapability; // Should be set by platform de
pendent code in StartCapture. |
| 99 private: | 98 private: |
| 100 void UpdateFrameCount(); | 99 void UpdateFrameCount(); |
| 101 uint32_t CalculateFrameRate(int64_t now_ns); | 100 uint32_t CalculateFrameRate(int64_t now_ns); |
| 102 | 101 |
| 103 // last time the module process function was called. | 102 // last time the module process function was called. |
| 104 int64_t _lastProcessTimeNanos; | 103 int64_t _lastProcessTimeNanos; |
| 105 // last time the frame rate callback function was called. | 104 // last time the frame rate callback function was called. |
| 106 int64_t _lastFrameRateCallbackTimeNanos; | 105 int64_t _lastFrameRateCallbackTimeNanos; |
| 107 | 106 |
| 108 rtc::VideoSinkInterface<VideoFrame>* _dataCallBack; | 107 rtc::VideoSinkInterface<VideoFrame>* _dataCallBack; |
| 109 | 108 |
| 110 int64_t _lastProcessFrameTimeNanos; | 109 int64_t _lastProcessFrameTimeNanos; |
| 111 // timestamp for local captured frames | 110 // timestamp for local captured frames |
| 112 int64_t _incomingFrameTimesNanos[kFrameRateCountHistorySize]; | 111 int64_t _incomingFrameTimesNanos[kFrameRateCountHistorySize]; |
| 113 VideoRotation _rotateFrame; // Set if the frame should be rotated by the | 112 VideoRotation _rotateFrame; // Set if the frame should be rotated by the |
| 114 // capture module. | 113 // capture module. |
| 115 | 114 |
| 116 // Indicate whether rotation should be applied before delivered externally. | 115 // Indicate whether rotation should be applied before delivered externally. |
| 117 bool apply_rotation_; | 116 bool apply_rotation_; |
| 118 }; | 117 }; |
| 119 } // namespace videocapturemodule | 118 } // namespace videocapturemodule |
| 120 } // namespace webrtc | 119 } // namespace webrtc |
| 121 #endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_VIDEO_CAPTURE_IMPL_H_ | 120 #endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_VIDEO_CAPTURE_IMPL_H_ |
| OLD | NEW |