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

Side by Side Diff: webrtc/modules/video_capture/video_capture_impl.h

Issue 1888593004: Delete all use of tick_util.h. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
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
11 #ifndef WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_VIDEO_CAPTURE_IMPL_H_ 11 #ifndef WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_VIDEO_CAPTURE_IMPL_H_
12 #define WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_VIDEO_CAPTURE_IMPL_H_ 12 #define WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_VIDEO_CAPTURE_IMPL_H_
13 13
14 /* 14 /*
15 * video_capture_impl.h 15 * video_capture_impl.h
16 */ 16 */
17 17
18 #include "webrtc/base/scoped_ref_ptr.h" 18 #include "webrtc/base/scoped_ref_ptr.h"
19 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" 19 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
20 #include "webrtc/common_video/rotation.h" 20 #include "webrtc/common_video/rotation.h"
21 #include "webrtc/modules/video_capture/video_capture.h" 21 #include "webrtc/modules/video_capture/video_capture.h"
22 #include "webrtc/modules/video_capture/video_capture_config.h" 22 #include "webrtc/modules/video_capture/video_capture_config.h"
23 #include "webrtc/system_wrappers/include/tick_util.h"
24 #include "webrtc/video_frame.h" 23 #include "webrtc/video_frame.h"
25 24
26 namespace webrtc 25 namespace webrtc
27 { 26 {
28 class CriticalSectionWrapper; 27 class CriticalSectionWrapper;
29 28
30 namespace videocapturemodule { 29 namespace videocapturemodule {
31 // Class definitions 30 // Class definitions
32 class VideoCaptureImpl: public VideoCaptureModule, public VideoCaptureExternal 31 class VideoCaptureImpl: public VideoCaptureModule, public VideoCaptureExternal
33 { 32 {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 virtual ~VideoCaptureImpl(); 108 virtual ~VideoCaptureImpl();
110 int32_t DeliverCapturedFrame(VideoFrame& captureFrame); 109 int32_t DeliverCapturedFrame(VideoFrame& captureFrame);
111 110
112 int32_t _id; // Module ID 111 int32_t _id; // Module ID
113 char* _deviceUniqueId; // current Device unique name; 112 char* _deviceUniqueId; // current Device unique name;
114 CriticalSectionWrapper& _apiCs; 113 CriticalSectionWrapper& _apiCs;
115 int32_t _captureDelay; // Current capture delay. May be changed of platform dependent parts. 114 int32_t _captureDelay; // Current capture delay. May be changed of platform dependent parts.
116 VideoCaptureCapability _requestedCapability; // Should be set by platform de pendent code in StartCapture. 115 VideoCaptureCapability _requestedCapability; // Should be set by platform de pendent code in StartCapture.
117 private: 116 private:
118 void UpdateFrameCount(); 117 void UpdateFrameCount();
119 uint32_t CalculateFrameRate(const TickTime& now); 118 uint32_t CalculateFrameRate(int64_t now_ns);
120 119
121 CriticalSectionWrapper& _callBackCs; 120 CriticalSectionWrapper& _callBackCs;
122 121
123 TickTime _lastProcessTime; // last time the module process function was call ed. 122 int64_t _lastProcessTime; // last time the module process function was calle d.
stefan-webrtc 2016/04/19 09:19:12 Add units to these now that they aren't ticks.
nisse-webrtc 2016/04/19 12:19:25 Adding "Nanos" to _lastProcessTime, _lastFrameRate
124 TickTime _lastFrameRateCallbackTime; // last time the frame rate callback fu nction was called. 123 int64_t _lastFrameRateCallbackTime; // last time the frame rate callback fun ction was called.
125 bool _frameRateCallBack; // true if EnableFrameRateCallback 124 bool _frameRateCallBack; // true if EnableFrameRateCallback
126 bool _noPictureAlarmCallBack; //true if EnableNoPictureAlarm 125 bool _noPictureAlarmCallBack; //true if EnableNoPictureAlarm
127 VideoCaptureAlarm _captureAlarm; // current value of the noPictureAlarm 126 VideoCaptureAlarm _captureAlarm; // current value of the noPictureAlarm
128 127
129 int32_t _setCaptureDelay; // The currently used capture delay 128 int32_t _setCaptureDelay; // The currently used capture delay
130 VideoCaptureDataCallback* _dataCallBack; 129 VideoCaptureDataCallback* _dataCallBack;
131 VideoCaptureFeedBack* _captureCallBack; 130 VideoCaptureFeedBack* _captureCallBack;
132 131
133 TickTime _lastProcessFrameCount; 132 int64_t _lastProcessFrameCount;
stefan-webrtc 2016/04/19 09:19:12 ...Count is a weird name for a time
nisse-webrtc 2016/04/19 12:19:25 Renaming, to the somewhat awkward _lastProcessFram
134 TickTime _incomingFrameTimes[kFrameRateCountHistorySize];// timestamp for lo cal captured frames 133 int64_t _incomingFrameTimes[kFrameRateCountHistorySize];// timestamp for loc al captured frames
stefan-webrtc 2016/04/19 09:19:12 unit
135 VideoRotation _rotateFrame; // Set if the frame should be rotated by the 134 VideoRotation _rotateFrame; // Set if the frame should be rotated by the
136 // capture module. 135 // capture module.
137 136
138 VideoFrame _captureFrame; 137 VideoFrame _captureFrame;
139 138
140 // Indicate whether rotation should be applied before delivered externally. 139 // Indicate whether rotation should be applied before delivered externally.
141 bool apply_rotation_; 140 bool apply_rotation_;
142 }; 141 };
143 } // namespace videocapturemodule 142 } // namespace videocapturemodule
144 } // namespace webrtc 143 } // namespace webrtc
145 #endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_VIDEO_CAPTURE_IMPL_H_ 144 #endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_VIDEO_CAPTURE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698