Commit 62640eb0 authored by Miguel Casas-Sanchez's avatar Miguel Casas-Sanchez Committed by Commit Bot

Follow up comments to crrev.com/c/1560384

- s/DECODE_COMPLETE_TIMESTAMP/DECODE_TIME/
- Moved place where that metadata is stamped.

Bug: 950183
Change-Id: Iab34674090aaf0bc10e65ed0bee157a0aa63586a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1575580Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652595}
parent 180f7762
...@@ -190,9 +190,8 @@ void MediaStreamRemoteVideoSource::RemoteVideoSourceDelegate::OnFrame( ...@@ -190,9 +190,8 @@ void MediaStreamRemoteVideoSource::RemoteVideoSourceDelegate::OnFrame(
video_frame->metadata()->SetTimeTicks( video_frame->metadata()->SetTimeTicks(
media::VideoFrameMetadata::REFERENCE_TIME, render_time); media::VideoFrameMetadata::REFERENCE_TIME, render_time);
} }
video_frame->metadata()->SetTimeTicks( video_frame->metadata()->SetTimeTicks(media::VideoFrameMetadata::DECODE_TIME,
media::VideoFrameMetadata::DECODE_COMPLETE_TIMESTAMP, base::TimeTicks::Now());
base::TimeTicks::Now());
io_task_runner_->PostTask( io_task_runner_->PostTask(
FROM_HERE, FROM_HERE,
......
...@@ -164,7 +164,7 @@ class MEDIA_EXPORT VideoFrameMetadata { ...@@ -164,7 +164,7 @@ class MEDIA_EXPORT VideoFrameMetadata {
// If present, this field represents the local time at which the VideoFrame // If present, this field represents the local time at which the VideoFrame
// was decoded from whichever format it was encoded in. // was decoded from whichever format it was encoded in.
// Use Get/SetTimeTicks() for this key. // Use Get/SetTimeTicks() for this key.
DECODE_COMPLETE_TIMESTAMP, DECODE_TIME,
NUM_KEYS NUM_KEYS
}; };
......
...@@ -199,6 +199,11 @@ void DecoderStreamTraits<DemuxerStream::VIDEO>::OnDecode( ...@@ -199,6 +199,11 @@ void DecoderStreamTraits<DemuxerStream::VIDEO>::OnDecode(
PostDecodeAction DecoderStreamTraits<DemuxerStream::VIDEO>::OnDecodeDone( PostDecodeAction DecoderStreamTraits<DemuxerStream::VIDEO>::OnDecodeDone(
const scoped_refptr<OutputType>& buffer) { const scoped_refptr<OutputType>& buffer) {
// Add a timestamp here (after decoding completed) to enable buffering delay
// measurements down the line.
buffer->metadata()->SetTimeTicks(media::VideoFrameMetadata::DECODE_TIME,
base::TimeTicks::Now());
auto it = frame_metadata_.find(buffer->timestamp()); auto it = frame_metadata_.find(buffer->timestamp());
// If the frame isn't in |frame_metadata_| it probably was erased below on a // If the frame isn't in |frame_metadata_| it probably was erased below on a
...@@ -218,12 +223,6 @@ PostDecodeAction DecoderStreamTraits<DemuxerStream::VIDEO>::OnDecodeDone( ...@@ -218,12 +223,6 @@ PostDecodeAction DecoderStreamTraits<DemuxerStream::VIDEO>::OnDecodeDone(
it->second.duration); it->second.duration);
} }
// Add a timestamp here (after decoding completed) to enable buffering delay
// measurements down the line.
buffer->metadata()->SetTimeTicks(
media::VideoFrameMetadata::DECODE_COMPLETE_TIMESTAMP,
base::TimeTicks::Now());
// We erase from the beginning onward to our target frame since frames should // We erase from the beginning onward to our target frame since frames should
// be returned in presentation order. It's possible to accumulate entries in // be returned in presentation order. It's possible to accumulate entries in
// this queue if playback begins at a non-keyframe; those frames may never be // this queue if playback begins at a non-keyframe; those frames may never be
......
...@@ -492,9 +492,8 @@ viz::CompositorFrame VideoFrameSubmitter::CreateCompositorFrame( ...@@ -492,9 +492,8 @@ viz::CompositorFrame VideoFrameSubmitter::CreateCompositorFrame(
compositor_frame.metadata.frame_token = ++next_frame_token_; compositor_frame.metadata.frame_token = ++next_frame_token_;
base::TimeTicks value; base::TimeTicks value;
if (video_frame && if (video_frame && video_frame->metadata()->GetTimeTicks(
video_frame->metadata()->GetTimeTicks( media::VideoFrameMetadata::DECODE_TIME, &value)) {
media::VideoFrameMetadata::DECODE_COMPLETE_TIMESTAMP, &value)) {
TRACE_EVENT_ASYNC_BEGIN_WITH_TIMESTAMP0("media", "VideoFrameSubmitter", TRACE_EVENT_ASYNC_BEGIN_WITH_TIMESTAMP0("media", "VideoFrameSubmitter",
*next_frame_token_, value); *next_frame_token_, value);
TRACE_EVENT_ASYNC_STEP_PAST0("media", "VideoFrameSubmitter", TRACE_EVENT_ASYNC_STEP_PAST0("media", "VideoFrameSubmitter",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment