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

Issue 2045813003: Decouple capture timestamp and reference time (Closed)

Created:
4 years, 6 months ago by qiangchen
Modified:
4 years, 6 months ago
Reviewers:
palmer, mcasas, DaleCurtis, miu
CC:
chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch+vc_chromium.org, miu+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, posciak+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Decouple capture timestamp and reference time In this CL, we make the captured VideoFrame to take capture device timestamp; and take system clock reference time. Background: Previously, we have only timestamp parameter, and it actually plays the role as timestamp and reference_time. Here we define timestamp as the ideal time span between the current frame and the first frame in the stream. Define reference time as the system clock time when the frame gets generated. Ideally, timestamp can be derived from reference_time. However, in reality, especially in a multi process application like Chrome, system clock read has noise on the order of 5ms. To overcome that, we found the original timestamp from camera driver is much smoother. But the defect is that the camera clock would have a drift with respect to the system clock. Thus a perfect solution would be that we take system time for reference time, which is used for AV sync; we stream timestamp to the remote side, which will make the rendering smooth. This CL is complete for the complete fix. BUG=601657 TBR=palmer@chromium.org Committed: https://crrev.com/4387613998060e4d1691434d0be687bf012596ce Cr-Commit-Position: refs/heads/master@{#399304}

Patch Set 1 : #

Total comments: 16

Patch Set 2 : Metadata over parameter #

Total comments: 8

Patch Set 3 : Nit fixes #

Total comments: 2

Patch Set 4 : Nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+142 lines, -119 lines) Patch
M content/browser/media/capture/desktop_capture_device_aura_unittest.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/media/capture/desktop_capture_device_unittest.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device_unittest.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller.h View 1 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller.cc View 1 2 chunks +3 lines, -6 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller_event_handler.h View 1 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller_unittest.cc View 1 8 chunks +32 lines, -23 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_device_client.h View 1 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_device_client.cc View 1 2 chunks +8 lines, -9 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_device_client_unittest.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.h View 1 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc View 1 3 chunks +8 lines, -4 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_host.h View 1 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_host.cc View 1 2 chunks +2 lines, -3 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager_unittest.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M content/common/media/video_capture_messages.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/media/video_capture_impl.h View 1 2 chunks +10 lines, -10 lines 0 comments Download
M content/renderer/media/video_capture_impl.cc View 1 2 3 7 chunks +29 lines, -17 lines 0 comments Download
M content/renderer/media/video_capture_impl_unittest.cc View 1 2 1 chunk +11 lines, -3 lines 0 comments Download
M content/renderer/media/video_capture_message_filter.h View 1 1 chunk +7 lines, -8 lines 0 comments Download
M content/renderer/media/video_capture_message_filter_unittest.cc View 1 2 3 2 chunks +6 lines, -2 lines 0 comments Download
M media/capture/content/thread_safe_capture_oracle.h View 1 1 chunk +1 line, -1 line 0 comments Download
M media/capture/content/thread_safe_capture_oracle.cc View 1 2 chunks +7 lines, -4 lines 0 comments Download
M media/capture/video/fake_video_capture_device_unittest.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M media/capture/video/video_capture_device.h View 1 1 chunk +1 line, -2 lines 0 comments Download
M media/capture/video/video_capture_device_unittest.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 34 (18 generated)
qiangchen
The fix CL for capture timestamp vs reference_time. palmer@: can you take a look at ...
4 years, 6 months ago (2016-06-07 17:59:24 UTC) #6
miu
Good news! You won't need to make any IPC message change to pass the reference ...
4 years, 6 months ago (2016-06-07 20:03:47 UTC) #8
qiangchen
On 2016/06/07 20:03:47, miu (OOO June 11-19) wrote: > Good news! You won't need to ...
4 years, 6 months ago (2016-06-07 20:20:21 UTC) #9
miu
On 2016/06/07 20:20:21, qiangchenC wrote: > Can you double check how we can avoid a ...
4 years, 6 months ago (2016-06-07 20:27:11 UTC) #10
qiangchen
We still need palmer@ to do a security review. As the type of the IPC ...
4 years, 6 months ago (2016-06-08 18:04:31 UTC) #17
miu
PS2 lgtm % a few minor things: https://codereview.chromium.org/2045813003/diff/130001/content/renderer/media/video_capture_impl.cc File content/renderer/media/video_capture_impl.cc (right): https://codereview.chromium.org/2045813003/diff/130001/content/renderer/media/video_capture_impl.cc#newcode337 content/renderer/media/video_capture_impl.cc:337: // If ...
4 years, 6 months ago (2016-06-08 19:24:44 UTC) #18
qiangchen
palmer@: Can you take a look at content/common/media/video_capture_messages.h I just change an IPC parameter type ...
4 years, 6 months ago (2016-06-08 20:08:55 UTC) #19
qiangchen
Dale: Can you take a look at this CL? miu@ does not own all the ...
4 years, 6 months ago (2016-06-08 20:10:38 UTC) #20
DaleCurtis
lgtm
4 years, 6 months ago (2016-06-08 20:44:19 UTC) #21
miu
still lgtm. Thank you so much for plumbing this through! We are much much closer ...
4 years, 6 months ago (2016-06-08 21:14:08 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2045813003/190001
4 years, 6 months ago (2016-06-10 16:05:29 UTC) #27
palmer
lgtm
4 years, 6 months ago (2016-06-10 19:14:32 UTC) #28
commit-bot: I haz the power
Committed patchset #4 (id:190001)
4 years, 6 months ago (2016-06-10 22:46:09 UTC) #30
commit-bot: I haz the power
CQ bit was unchecked
4 years, 6 months ago (2016-06-10 22:46:40 UTC) #31
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/4387613998060e4d1691434d0be687bf012596ce Cr-Commit-Position: refs/heads/master@{#399304}
4 years, 6 months ago (2016-06-10 22:48:11 UTC) #33
qiangchen
4 years, 6 months ago (2016-06-13 16:09:53 UTC) #34
Message was sent while issue was closed.
https://codereview.chromium.org/2045813003/diff/150001/content/renderer/media...
File content/renderer/media/video_capture_impl.cc (right):

https://codereview.chromium.org/2045813003/diff/150001/content/renderer/media...
content/renderer/media/video_capture_impl.cc:340: // time.
On 2016/06/08 21:14:08, miu (OOO June 11-19) wrote:
> Can you add "http://crbug.com/618407" to the end of this comment, for tracking
> purposes?  ;-)

Done.

Powered by Google App Engine
This is Rietveld 408576698