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

Side by Side Diff: content/renderer/media/webrtc/media_stream_remote_video_source.cc

Issue 287313002: Pass a TimeTicks along video capture pipeline to represent capture time (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/webrtc/media_stream_remote_video_source.h" 5 #include "content/renderer/media/webrtc/media_stream_remote_video_source.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 FROM_HERE, 113 FROM_HERE,
114 base::Bind(&RemoteVideoSourceDelegate::DoRenderFrameOnIOThread, 114 base::Bind(&RemoteVideoSourceDelegate::DoRenderFrameOnIOThread,
115 this, video_frame, format)); 115 this, video_frame, format));
116 } 116 }
117 117
118 void MediaStreamRemoteVideoSource:: 118 void MediaStreamRemoteVideoSource::
119 RemoteVideoSourceDelegate::DoRenderFrameOnIOThread( 119 RemoteVideoSourceDelegate::DoRenderFrameOnIOThread(
120 scoped_refptr<media::VideoFrame> video_frame, 120 scoped_refptr<media::VideoFrame> video_frame,
121 const media::VideoCaptureFormat& format) { 121 const media::VideoCaptureFormat& format) {
122 DCHECK(io_message_loop_->BelongsToCurrentThread()); 122 DCHECK(io_message_loop_->BelongsToCurrentThread());
123 frame_callback_.Run(video_frame, format); 123 // We cannot estimate the local time when this frame is generated so give a
124 // null value to |estimated_capture_time|.
Ronghua Wu (Left Chromium) 2014/06/02 18:09:09 The comment is not accurate. We do have estimated
125 frame_callback_.Run(video_frame, format, base::TimeTicks());
124 } 126 }
125 127
126 MediaStreamRemoteVideoSource::MediaStreamRemoteVideoSource( 128 MediaStreamRemoteVideoSource::MediaStreamRemoteVideoSource(
127 webrtc::VideoTrackInterface* remote_track) 129 webrtc::VideoTrackInterface* remote_track)
128 : remote_track_(remote_track), 130 : remote_track_(remote_track),
129 last_state_(remote_track->state()) { 131 last_state_(remote_track->state()) {
130 remote_track_->RegisterObserver(this); 132 remote_track_->RegisterObserver(this);
131 } 133 }
132 134
133 MediaStreamRemoteVideoSource::~MediaStreamRemoteVideoSource() { 135 MediaStreamRemoteVideoSource::~MediaStreamRemoteVideoSource() {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 SetReadyState(blink::WebMediaStreamSource::ReadyStateEnded); 185 SetReadyState(blink::WebMediaStreamSource::ReadyStateEnded);
184 break; 186 break;
185 default: 187 default:
186 NOTREACHED(); 188 NOTREACHED();
187 break; 189 break;
188 } 190 }
189 } 191 }
190 } 192 }
191 193
192 } // namespace content 194 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698