| Index: chrome/renderer/media/cast_rtp_stream.cc
|
| diff --git a/chrome/renderer/media/cast_rtp_stream.cc b/chrome/renderer/media/cast_rtp_stream.cc
|
| index 42639abea781534e4c7b29a6c5134d4d57b8f324..cc0c6a3e8980f82281dffb1c1f879ec7d357caf7 100644
|
| --- a/chrome/renderer/media/cast_rtp_stream.cc
|
| +++ b/chrome/renderer/media/cast_rtp_stream.cc
|
| @@ -232,21 +232,26 @@ class CastVideoSink : public base::SupportsWeakPtr<CastVideoSink>,
|
| const scoped_refptr<media::cast::VideoFrameInput> frame_input,
|
| // These parameters are passed for each frame.
|
| const scoped_refptr<media::VideoFrame>& frame,
|
| - const media::VideoCaptureFormat& format) {
|
| + const media::VideoCaptureFormat& format,
|
| + const base::TimeTicks& estimated_capture_time) {
|
| if (frame->coded_size() != expected_coded_size) {
|
| error_callback.Run("Video frame resolution does not match config.");
|
| return;
|
| }
|
|
|
| - const base::TimeTicks now = base::TimeTicks::Now();
|
| + base::TimeTicks timestamp;
|
| + if (estimated_capture_time.is_null())
|
| + timestamp = base::TimeTicks::Now();
|
| + else
|
| + timestamp = estimated_capture_time;
|
|
|
| // Used by chrome/browser/extension/api/cast_streaming/performance_test.cc
|
| TRACE_EVENT_INSTANT2(
|
| "cast_perf_test", "MediaStreamVideoSink::OnVideoFrame",
|
| TRACE_EVENT_SCOPE_THREAD,
|
| - "timestamp", now.ToInternalValue(),
|
| + "timestamp", timestamp.ToInternalValue(),
|
| "time_delta", frame->timestamp().ToInternalValue());
|
| - frame_input->InsertRawVideoFrame(frame, now);
|
| + frame_input->InsertRawVideoFrame(frame, timestamp);
|
| }
|
|
|
| // Attach this sink to a video track represented by |track_|.
|
|
|