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

Issue 287313002: Pass a TimeTicks along video capture pipeline to represent capture time (Closed)

Created:
6 years, 7 months ago by Alpha Left Google
Modified:
6 years, 6 months ago
CC:
chromium-reviews, fischman+watch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, wjia+watch_chromium.org, Ronghua Wu (Left Chromium), perkj_chrome
Visibility:
Public.

Description

Pass a TimeTicks along video capture pipeline to represent capture time The goal of this change is to give more accurate information about when a video frame is generated. VideoFrame already provides a TimeDelta value as the presentation timestamp. This is unchanged but we provide an additional TimeTicks value to indicate the estimated capture time of the video frame. It accurately records the time when the videoframe is generated for local sources such as camera and tab capture device. This value will be an estimate for remote sources such as WebRTC. After this change cast streaming API is able to collect accurate information about how much time is spent in capturing. BUG=374541 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=274736

Patch Set 1 #

Total comments: 21

Patch Set 2 : start_time -> estimated_capture_time #

Patch Set 3 : comments #

Patch Set 4 : comments #

Patch Set 5 : comments #

Total comments: 2

Patch Set 6 : unit test #

Patch Set 7 : merged and land #

Unified diffs Side-by-side diffs Delta from patch set Stats (+180 lines, -59 lines) Patch
M chrome/renderer/media/cast_rtp_stream.cc View 1 2 3 4 5 1 chunk +9 lines, -4 lines 0 comments Download
M content/common/media/video_capture.h View 1 1 chunk +0 lines, -4 lines 0 comments Download
M content/public/renderer/media_stream_video_sink.h View 1 3 chunks +17 lines, -4 lines 0 comments Download
M content/public/renderer/media_stream_video_sink.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/media/media_stream_video_capture_source_unittest.cc View 1 2 3 4 5 2 chunks +66 lines, -0 lines 0 comments Download
M content/renderer/media/media_stream_video_source.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/media/media_stream_video_track.cc View 1 1 chunk +4 lines, -2 lines 0 comments Download
M content/renderer/media/media_stream_video_track_unittest.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/media/mock_media_stream_video_sink.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/media/mock_media_stream_video_sink.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/media/mock_media_stream_video_source.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/media/mock_media_stream_video_source.cc View 1 1 chunk +3 lines, -2 lines 0 comments Download
M content/renderer/media/rtc_video_renderer.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/media/rtc_video_renderer.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download
M content/renderer/media/video_capture_impl.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/media/video_capture_impl.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M content/renderer/media/video_capture_impl_manager.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/media/video_capture_impl_manager_unittest.cc View 1 1 chunk +3 lines, -2 lines 0 comments Download
M content/renderer/media/video_capture_impl_unittest.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M content/renderer/media/video_frame_deliverer.h View 1 2 chunks +5 lines, -3 lines 0 comments Download
M content/renderer/media/video_frame_deliverer.cc View 1 1 chunk +3 lines, -2 lines 0 comments Download
M content/renderer/media/video_source_handler.cc View 1 2 chunks +4 lines, -2 lines 0 comments Download
M content/renderer/media/video_track_adapter.h View 1 2 chunks +3 lines, -1 line 0 comments Download
M content/renderer/media/video_track_adapter.cc View 1 5 chunks +14 lines, -9 lines 0 comments Download
M content/renderer/media/webrtc/media_stream_remote_video_source.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/media/webrtc/video_destination_handler.cc View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M content/renderer/media/webrtc/webrtc_video_track_adapter.cc View 1 2 3 4 5 6 2 chunks +11 lines, -6 lines 0 comments Download
M content/renderer/pepper/pepper_media_stream_video_track_host.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/pepper/pepper_media_stream_video_track_host.cc View 1 2 3 2 chunks +5 lines, -2 lines 0 comments Download
M content/renderer/pepper/pepper_platform_video_capture.h View 1 2 chunks +3 lines, -1 line 0 comments Download
M content/renderer/pepper/pepper_platform_video_capture.cc View 1 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 51 (0 generated)
Alpha Left Google
I intentionally didn't put in anything related to date because I think it's a separate ...
6 years, 7 months ago (2014-05-18 00:01:22 UTC) #1
Ami GONE FROM CHROMIUM
Bunch of nits below, but my main question is why should start_ticks be fed with ...
6 years, 7 months ago (2014-05-19 19:01:46 UTC) #2
Alpha Left Google
> Bunch of nits below, but my main question is why should start_ticks be fed ...
6 years, 7 months ago (2014-05-19 20:40:12 UTC) #3
miu
https://codereview.chromium.org/287313002/diff/1/content/public/renderer/media_stream_video_sink.h File content/public/renderer/media_stream_video_sink.h (right): https://codereview.chromium.org/287313002/diff/1/content/public/renderer/media_stream_video_sink.h#newcode29 content/public/renderer/media_stream_video_sink.h:29: const base::TimeTicks& start_ticks)> Throughout this patch: Why must we ...
6 years, 7 months ago (2014-05-19 21:59:37 UTC) #4
Ami GONE FROM CHROMIUM
On 2014/05/19 20:40:12, Alpha wrote: > The signal for |start_ticks| is best delivered on the ...
6 years, 7 months ago (2014-05-19 22:14:11 UTC) #5
Ami GONE FROM CHROMIUM
https://codereview.chromium.org/287313002/diff/1/content/public/renderer/media_stream_video_sink.h File content/public/renderer/media_stream_video_sink.h (right): https://codereview.chromium.org/287313002/diff/1/content/public/renderer/media_stream_video_sink.h#newcode30 content/public/renderer/media_stream_video_sink.h:30: VideoSinkDeliverFrameCB; Is it easy to see why VideoSinkDeliverFrameCB and ...
6 years, 7 months ago (2014-05-19 22:14:16 UTC) #6
Alpha Left Google
On 2014/05/19 21:59:37, miu wrote: > https://codereview.chromium.org/287313002/diff/1/content/public/renderer/media_stream_video_sink.h > File content/public/renderer/media_stream_video_sink.h (right): > > https://codereview.chromium.org/287313002/diff/1/content/public/renderer/media_stream_video_sink.h#newcode29 > ...
6 years, 7 months ago (2014-05-19 22:25:51 UTC) #7
Ami GONE FROM CHROMIUM
On Mon, May 19, 2014 at 3:25 PM, <hclam@chromium.org> wrote: > simplest for consumers (sinks) ...
6 years, 7 months ago (2014-05-19 23:03:47 UTC) #8
miu
On 2014/05/19 23:03:47, Ami Fischman wrote: > On Mon, May 19, 2014 at 3:25 PM, ...
6 years, 7 months ago (2014-05-19 23:57:58 UTC) #9
Alpha Left Google
On 2014/05/19 23:03:47, Ami Fischman wrote: > On Mon, May 19, 2014 at 3:25 PM, ...
6 years, 7 months ago (2014-05-20 00:49:31 UTC) #10
Ami GONE FROM CHROMIUM
On Mon, May 19, 2014 at 5:49 PM, <hclam@chromium.org> wrote: > On 2014/05/19 23:03:47, Ami ...
6 years, 7 months ago (2014-05-21 20:43:48 UTC) #11
Alpha Left Google
> What is it about having two callbacks that would prevent this approach? There needs ...
6 years, 7 months ago (2014-05-21 20:55:21 UTC) #12
Ami GONE FROM CHROMIUM
On 2014/05/21 20:55:21, Alpha wrote: > > What is it about having two callbacks that ...
6 years, 7 months ago (2014-05-21 21:18:18 UTC) #13
Alpha Left Google
> OIC. Are your worries allayed by using base:Owned? I.e. something like: > > struct ...
6 years, 7 months ago (2014-05-22 19:15:05 UTC) #14
Ami GONE FROM CHROMIUM
On 2014/05/22 19:15:05, Alpha wrote: > RemoveSink must be called on the render thread. We ...
6 years, 7 months ago (2014-05-22 19:47:57 UTC) #15
Alpha Left Google
On 2014/05/22 19:47:57, Ami Fischman wrote: > On 2014/05/22 19:15:05, Alpha wrote: > > > ...
6 years, 7 months ago (2014-05-22 20:33:14 UTC) #16
Ami GONE FROM CHROMIUM
Alpha & I spoke f2f; summary: - we like that streams have a TimeTicks start ...
6 years, 7 months ago (2014-05-22 23:21:26 UTC) #17
Ronghua Wu (Left Chromium)
I think from e2e timestamp project points of view, current approach is better, i.e. it ...
6 years, 7 months ago (2014-05-22 23:32:15 UTC) #18
Ami GONE FROM CHROMIUM
Sorry, what do you mean "current approach"? On Thu, May 22, 2014 at 4:31 PM, ...
6 years, 7 months ago (2014-05-22 23:45:32 UTC) #19
Ronghua Wu (Left Chromium)
Sorry I meant passing start_tick for each frame. On Thu, May 22, 2014 at 4:45 ...
6 years, 7 months ago (2014-05-22 23:53:45 UTC) #20
Ami GONE FROM CHROMIUM
Huh. What do you envision should happen when the clock shifts or estimation adjusts? Would ...
6 years, 7 months ago (2014-05-23 01:07:34 UTC) #21
Ronghua Wu (Left Chromium)
Yes, a different start_time will be send. 1) timestamp is monotonicity 2) start_time is not ...
6 years, 7 months ago (2014-05-23 04:08:15 UTC) #22
Ami GONE FROM CHROMIUM
Perhaps we're failing to communicate :) Both the current CL's approach and the potential update ...
6 years, 7 months ago (2014-05-23 18:22:09 UTC) #23
Alpha Left Google
ronghua: Please comment on the issue of passing TimeTicks with frame delivery vs callback for ...
6 years, 7 months ago (2014-05-27 19:01:01 UTC) #24
Ronghua Wu (Left Chromium)
I was chatting with Ami offline. My main point was the start time is per ...
6 years, 7 months ago (2014-05-27 21:21:58 UTC) #25
Ami GONE FROM CHROMIUM
To re-state what Ronghua said (which was news to me): the estimating that happens in ...
6 years, 7 months ago (2014-05-27 22:14:31 UTC) #26
Alpha Left Google
Thanks. Looks like we're getting a consensus. |start_ticks| was a compromise to avoid having duplicated ...
6 years, 7 months ago (2014-05-28 01:14:14 UTC) #27
miu
On 2014/05/28 01:14:14, Alpha wrote: > Thanks. Looks like we're getting a consensus. > > ...
6 years, 7 months ago (2014-05-28 02:11:50 UTC) #28
Ronghua Wu (Left Chromium)
Good summary Yuri. Passing around the capture time instead of the start time SGTM. One ...
6 years, 6 months ago (2014-05-28 17:42:51 UTC) #29
Alpha Left Google
On 2014/05/28 17:42:51, Ronghua Wu wrote: > Good summary Yuri. > > Passing around the ...
6 years, 6 months ago (2014-05-28 17:44:58 UTC) #30
Ronghua Wu (Left Chromium)
On Wed, May 28, 2014 at 10:44 AM, <hclam@chromium.org> wrote: > On 2014/05/28 17:42:51, Ronghua ...
6 years, 6 months ago (2014-05-28 17:57:22 UTC) #31
Alpha Left Google
> 1) I wonder how will this impact how <video> tag's currentTime attribute is > ...
6 years, 6 months ago (2014-05-29 01:51:10 UTC) #32
Ronghua Wu (Left Chromium)
SGTM. I have no more questions for now. I guess you will update your patch ...
6 years, 6 months ago (2014-05-29 22:29:50 UTC) #33
Alpha Left Google
That's right. Working on it. Will have it tomorrow.
6 years, 6 months ago (2014-05-29 22:30:43 UTC) #34
Alpha Left Google
Code and CL description updated based on our discussion. https://codereview.chromium.org/287313002/diff/1/chrome/renderer/media/cast_rtp_stream.cc File chrome/renderer/media/cast_rtp_stream.cc (right): https://codereview.chromium.org/287313002/diff/1/chrome/renderer/media/cast_rtp_stream.cc#newcode1 chrome/renderer/media/cast_rtp_stream.cc:1: ...
6 years, 6 months ago (2014-05-31 00:34:50 UTC) #35
miu
lgtm https://codereview.chromium.org/287313002/diff/80001/chrome/renderer/media/cast_rtp_stream.cc File chrome/renderer/media/cast_rtp_stream.cc (right): https://codereview.chromium.org/287313002/diff/80001/chrome/renderer/media/cast_rtp_stream.cc#newcode242 chrome/renderer/media/cast_rtp_stream.cc:242: base::TimeTicks timestamp = base::TimeTicks::Now(); nit: Avoid unnecessary probing ...
6 years, 6 months ago (2014-05-31 02:37:25 UTC) #36
Ami GONE FROM CHROMIUM
LGTM % miu's nit; thanks for driving consensus on this hairy issue. A suggestion for ...
6 years, 6 months ago (2014-06-02 17:55:49 UTC) #37
Ronghua Wu (Left Chromium)
LGTM one more besides miu and ami's comments. https://codereview.chromium.org/287313002/diff/80001/content/renderer/media/webrtc/media_stream_remote_video_source.cc File content/renderer/media/webrtc/media_stream_remote_video_source.cc (right): https://codereview.chromium.org/287313002/diff/80001/content/renderer/media/webrtc/media_stream_remote_video_source.cc#newcode124 content/renderer/media/webrtc/media_stream_remote_video_source.cc:124: // ...
6 years, 6 months ago (2014-06-02 18:09:08 UTC) #38
Alpha Left Google
+dmichael for pepper +jam for content/public
6 years, 6 months ago (2014-06-02 22:07:39 UTC) #39
Alpha Left Google
I have added a unit test to see the TimeTicks passes through the system. However ...
6 years, 6 months ago (2014-06-02 22:08:43 UTC) #40
dmichael (off chromium)
lgtm
6 years, 6 months ago (2014-06-02 22:43:59 UTC) #41
jam
lgtm
6 years, 6 months ago (2014-06-03 16:39:54 UTC) #42
Alpha Left Google
The CQ bit was checked by hclam@chromium.org
6 years, 6 months ago (2014-06-03 18:07:37 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hclam@chromium.org/287313002/100001
6 years, 6 months ago (2014-06-03 18:08:57 UTC) #44
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_chromium_gn_compile_rel on tryserver.chromium ...
6 years, 6 months ago (2014-06-03 22:54:13 UTC) #45
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-03 22:57:36 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/chromium_presubmit/builds/71425) linux_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel/builds/38004)
6 years, 6 months ago (2014-06-03 22:57:37 UTC) #47
Alpha Left Google
The CQ bit was checked by hclam@chromium.org
6 years, 6 months ago (2014-06-03 23:05:07 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hclam@chromium.org/287313002/120001
6 years, 6 months ago (2014-06-03 23:05:59 UTC) #49
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel on tryserver.chromium ...
6 years, 6 months ago (2014-06-04 02:46:20 UTC) #50
commit-bot: I haz the power
6 years, 6 months ago (2014-06-04 09:07:23 UTC) #51
Message was sent while issue was closed.
Change committed as 274736

Powered by Google App Engine
This is Rietveld 408576698