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

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

Created:
4 years, 7 months ago by qiangchen
Modified:
4 years, 7 months ago
Reviewers:
DaleCurtis, miu
CC:
chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch+vc_chromium.org, miu+watch_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 changed the signature of VideoCaptureDevice::OnIncomingCapturedData to take one more parameter called 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 preliminary for the complete fix. BUG=601657 Committed: https://crrev.com/ed732c9c81df6d8fd4cfb4105ad154f52d458cd9 Cr-Commit-Position: refs/heads/master@{#396021}

Patch Set 1 : #

Total comments: 22

Patch Set 2 : Change OnIncomingCapturedBuffer Sig #

Total comments: 6

Patch Set 3 : Resolve Comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+198 lines, -161 lines) Patch
M content/browser/media/capture/desktop_capture_device.cc View 2 chunks +7 lines, -1 line 0 comments Download
M content/browser/media/capture/desktop_capture_device_aura_unittest.cc View 1 2 chunks +6 lines, -14 lines 0 comments Download
M content/browser/media/capture/desktop_capture_device_unittest.cc View 1 9 chunks +41 lines, -40 lines 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device_unittest.cc View 1 2 chunks +6 lines, -14 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_device_client.h View 1 1 chunk +5 lines, -3 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_device_client.cc View 1 2 6 chunks +17 lines, -15 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_device_client_unittest.cc View 1 5 chunks +8 lines, -6 lines 0 comments Download
M media/capture/video/android/video_capture_device_android.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M media/capture/video/android/video_capture_device_android.cc View 1 2 chunks +5 lines, -2 lines 0 comments Download
M media/capture/video/fake_video_capture_device.h View 1 chunk +2 lines, -0 lines 0 comments Download
M media/capture/video/fake_video_capture_device.cc View 1 2 chunks +9 lines, -3 lines 0 comments Download
M media/capture/video/fake_video_capture_device_unittest.cc View 1 2 chunks +5 lines, -3 lines 0 comments Download
M media/capture/video/file_video_capture_device.h View 1 chunk +2 lines, -0 lines 0 comments Download
M media/capture/video/file_video_capture_device.cc View 1 chunk +3 lines, -1 line 0 comments Download
M media/capture/video/linux/v4l2_capture_delegate.cc View 1 1 chunk +5 lines, -1 line 0 comments Download
M media/capture/video/mac/video_capture_device_decklink_mac.h View 1 chunk +2 lines, -1 line 0 comments Download
M media/capture/video/mac/video_capture_device_decklink_mac.mm View 1 2 3 chunks +19 lines, -3 lines 0 comments Download
M media/capture/video/mac/video_capture_device_mac.h View 1 chunk +0 lines, -3 lines 0 comments Download
M media/capture/video/mac/video_capture_device_mac.mm View 1 2 chunks +1 line, -12 lines 0 comments Download
M media/capture/video/video_capture_device.h View 1 2 2 chunks +14 lines, -4 lines 0 comments Download
M media/capture/video/video_capture_device_unittest.cc View 1 4 chunks +5 lines, -15 lines 0 comments Download
M media/capture/video/win/sink_filter_observer_win.h View 1 chunk +1 line, -1 line 0 comments Download
M media/capture/video/win/sink_input_pin_win.cc View 2 chunks +3 lines, -5 lines 0 comments Download
M media/capture/video/win/video_capture_device_mf_win.h View 1 chunk +2 lines, -1 line 0 comments Download
M media/capture/video/win/video_capture_device_mf_win.cc View 3 chunks +15 lines, -10 lines 0 comments Download
M media/capture/video/win/video_capture_device_win.h View 2 chunks +3 lines, -1 line 0 comments Download
M media/capture/video/win/video_capture_device_win.cc View 1 2 chunks +11 lines, -2 lines 0 comments Download

Messages

Total messages: 25 (16 generated)
qiangchen
This CL is preliminary for fix of crbug/601657. In this CL, we essentially changed the ...
4 years, 7 months ago (2016-05-18 20:41:45 UTC) #12
miu
Thanks for doing this! :) Comments on Patch Set 1: https://codereview.chromium.org/1983193002/diff/100001/content/browser/renderer_host/media/video_capture_device_client.cc File content/browser/renderer_host/media/video_capture_device_client.cc (right): https://codereview.chromium.org/1983193002/diff/100001/content/browser/renderer_host/media/video_capture_device_client.cc#newcode258 ...
4 years, 7 months ago (2016-05-18 22:35:41 UTC) #13
qiangchen
Fixed, thanks. https://codereview.chromium.org/1983193002/diff/100001/content/browser/renderer_host/media/video_capture_device_client.cc File content/browser/renderer_host/media/video_capture_device_client.cc (right): https://codereview.chromium.org/1983193002/diff/100001/content/browser/renderer_host/media/video_capture_device_client.cc#newcode258 content/browser/renderer_host/media/video_capture_device_client.cc:258: OnIncomingCapturedBuffer(std::move(buffer), output_format, reference_time); On 2016/05/18 22:35:40, miu ...
4 years, 7 months ago (2016-05-20 17:55:14 UTC) #15
miu
Nice work! Thanks for plumbing this in! :-) lgtm % a few minor things: https://codereview.chromium.org/1983193002/diff/140001/content/browser/renderer_host/media/video_capture_device_client.cc ...
4 years, 7 months ago (2016-05-25 01:51:30 UTC) #16
qiangchen
fixed. https://codereview.chromium.org/1983193002/diff/140001/content/browser/renderer_host/media/video_capture_device_client.cc File content/browser/renderer_host/media/video_capture_device_client.cc (right): https://codereview.chromium.org/1983193002/diff/140001/content/browser/renderer_host/media/video_capture_device_client.cc#newcode326 content/browser/renderer_host/media/video_capture_device_client.cc:326: frame->set_timestamp(timestamp); On 2016/05/25 01:51:30, miu wrote: > nit: ...
4 years, 7 months ago (2016-05-25 16:46:17 UTC) #17
DaleCurtis
skimmed and rs lgtm, defer to yuri's review.
4 years, 7 months ago (2016-05-25 20:00:12 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1983193002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1983193002/160001
4 years, 7 months ago (2016-05-25 22:44:41 UTC) #21
commit-bot: I haz the power
Committed patchset #3 (id:160001)
4 years, 7 months ago (2016-05-25 22:51:57 UTC) #23
commit-bot: I haz the power
4 years, 7 months ago (2016-05-25 22:53:31 UTC) #25
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/ed732c9c81df6d8fd4cfb4105ad154f52d458cd9
Cr-Commit-Position: refs/heads/master@{#396021}

Powered by Google App Engine
This is Rietveld 408576698