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

Issue 2272873002: Android video capture: only use reference time for outbound timestamp. (Closed)

Created:
4 years, 3 months ago by braveyao
Modified:
4 years, 3 months ago
Reviewers:
qiangchen, miu
CC:
chromium-reviews, posciak+watch_chromium.org, feature-media-reviews_chromium.org, mcasas+watch+vc_chromium.org, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Android video capture: only use reference time for outbound timestamp. on Android, video capture may be stopped/started when Chrome switches between background and foreground. Each time when video capture is started, a new instance of VideoCaptureDeviceAndroid will be created, which will change the base value of "first_ref_time_". So the timestamp calculated by "current_time - first_ref_time_" won't be monotonically increasing to the same video stream. The consequence is frames will be dropped until the timestamp catches up to the old one cached in video_capture_input.cc finally. So on Android we should set the timestamp with 0 and use the reference time only. BUG=640387 Committed: https://crrev.com/4a93aa65fbe67592f324b1ea45dcdc0342801f0d Cr-Commit-Position: refs/heads/master@{#416814}

Patch Set 1 #

Patch Set 2 : use raw timestamp from camera capture #

Total comments: 15

Patch Set 3 : rebase to get this branch compiled #

Patch Set 4 : address comments #

Total comments: 2

Patch Set 5 : estimate a timestamp in Camera1 callback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -9 lines) Patch
M media/capture/video/android/java/src/org/chromium/media/VideoCapture.java View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M media/capture/video/android/video_capture_device_android.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M media/capture/video/android/video_capture_device_android.cc View 1 2 3 4 6 chunks +13 lines, -5 lines 0 comments Download

Messages

Total messages: 45 (30 generated)
braveyao
Hi qiangchen@, please take a look.
4 years, 3 months ago (2016-08-23 23:00:52 UTC) #4
qiangchen
The current code relies on the [1] to calculate timestamp from reference time. Ask miu@ ...
4 years, 3 months ago (2016-08-23 23:06:05 UTC) #5
qiangchen
lgtm
4 years, 3 months ago (2016-08-23 23:06:10 UTC) #6
braveyao
+ miu@
4 years, 3 months ago (2016-08-23 23:10:39 UTC) #8
braveyao
Hi qiangchen@ and miu@, The first patchset is to fallback to the previous processing. Here ...
4 years, 3 months ago (2016-08-24 22:25:45 UTC) #13
braveyao
Hi miu@, please have a look when you get chance.
4 years, 3 months ago (2016-08-30 22:17:55 UTC) #16
miu
On 2016/08/30 22:17:55, braveyao wrote: > Hi miu@, please have a look when you get ...
4 years, 3 months ago (2016-08-31 20:56:40 UTC) #17
miu
https://codereview.chromium.org/2272873002/diff/20001/media/capture/video/android/java/src/org/chromium/media/VideoCapture.java File media/capture/video/android/java/src/org/chromium/media/VideoCapture.java (right): https://codereview.chromium.org/2272873002/diff/20001/media/capture/video/android/java/src/org/chromium/media/VideoCapture.java#newcode125 media/capture/video/android/java/src/org/chromium/media/VideoCapture.java:125: public native void nativeOnFrameAvailable( Please plumb in timestamp here ...
4 years, 3 months ago (2016-08-31 21:09:17 UTC) #18
braveyao
Hi miu, Thanks a lot! But I can't get all your concerns. Please check my ...
4 years, 3 months ago (2016-08-31 23:01:28 UTC) #22
miu
https://codereview.chromium.org/2272873002/diff/20001/media/capture/video/android/java/src/org/chromium/media/VideoCapture.java File media/capture/video/android/java/src/org/chromium/media/VideoCapture.java (right): https://codereview.chromium.org/2272873002/diff/20001/media/capture/video/android/java/src/org/chromium/media/VideoCapture.java#newcode125 media/capture/video/android/java/src/org/chromium/media/VideoCapture.java:125: public native void nativeOnFrameAvailable( On 2016/08/31 23:01:28, braveyao wrote: ...
4 years, 3 months ago (2016-09-02 21:49:15 UTC) #25
braveyao
Thanks so much for the discussion. PTAL! https://codereview.chromium.org/2272873002/diff/80001/media/capture/video/android/video_capture_device_android.cc File media/capture/video/android/video_capture_device_android.cc (right): https://codereview.chromium.org/2272873002/diff/80001/media/capture/video/android/video_capture_device_android.cc#newcode274 media/capture/video/android/video_capture_device_android.cc:274: base::TimeDelta()); On ...
4 years, 3 months ago (2016-09-02 23:25:53 UTC) #36
miu
lgtm
4 years, 3 months ago (2016-09-06 22:41:33 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2272873002/140001
4 years, 3 months ago (2016-09-06 22:43:27 UTC) #42
commit-bot: I haz the power
Committed patchset #5 (id:140001)
4 years, 3 months ago (2016-09-07 01:25:40 UTC) #43
commit-bot: I haz the power
4 years, 3 months ago (2016-09-07 01:28:03 UTC) #45
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/4a93aa65fbe67592f324b1ea45dcdc0342801f0d
Cr-Commit-Position: refs/heads/master@{#416814}

Powered by Google App Engine
This is Rietveld 408576698