Chromium Code Reviews| Index: webrtc/media/base/videocapturer.h |
| diff --git a/webrtc/media/base/videocapturer.h b/webrtc/media/base/videocapturer.h |
| index 329ba086b90dfe1139c6f83cdd41b291af38540f..08e07e3b35cbca3e495759d5f7e180eaa9b7a281 100644 |
| --- a/webrtc/media/base/videocapturer.h |
| +++ b/webrtc/media/base/videocapturer.h |
| @@ -225,6 +225,9 @@ class VideoCapturer : public sigslot::has_slots<>, |
| // Reports the appropriate frame size after adaptation. Returns true |
| // if a frame is wanted. Returns false if there are no interested |
| // sinks, or if the VideoAdapter decides to drop the frame. |
| + // |capture_time_ns| is the camera's timestamp, using an arbitrary |
| + // offset and possibly slightly off frequency. |time_us| is the |
| + // timestamp translated into the same scale as rtc::TimeMicros. |
|
pthatcher1
2016/05/27 22:47:44
Then why not call it capture_time_us?
And why r
nisse-webrtc
2016/05/30 08:57:29
The nanosecond unit on the input argument, |captur
|
| bool AdaptFrame(int width, |
| int height, |
| int64_t capture_time_ns, |
| @@ -233,7 +236,8 @@ class VideoCapturer : public sigslot::has_slots<>, |
| int* crop_width, |
| int* crop_height, |
| int* crop_x, |
| - int* crop_y); |
| + int* crop_y, |
| + int64_t* time_us); |
| // Callback attached to SignalFrameCaptured where SignalVideoFrames is called. |
| void OnFrameCaptured(VideoCapturer* video_capturer, |
| @@ -284,6 +288,8 @@ class VideoCapturer : public sigslot::has_slots<>, |
| void UpdateInputSize(int width, int height); |
| + void UpdateOffset(int64_t capture_time_us); |
|
pthatcher1
2016/05/27 22:47:44
This method could use a comment explaining what it
nisse-webrtc
2016/05/30 08:57:29
Since it's a private method, I put the explanatory
|
| + |
| rtc::ThreadChecker thread_checker_; |
| std::string id_; |
| CaptureState capture_state_; |
| @@ -310,6 +316,10 @@ class VideoCapturer : public sigslot::has_slots<>, |
| // Whether capturer should apply rotation to the frame before signaling it. |
| bool apply_rotation_; |
| + // State for the timestamp translation. |
| + unsigned frames_seen_; |
| + int64_t offset_us_; |
|
pthatcher1
2016/05/27 22:47:44
This could use a little more clarity on what it me
nisse-webrtc
2016/05/30 08:57:29
I'm adding a short comment.
|
| + |
| RTC_DISALLOW_COPY_AND_ASSIGN(VideoCapturer); |
| }; |