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

Side by Side Diff: content/renderer/media/mock_media_stream_video_sink.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: merged and land 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/mock_media_stream_video_sink.h" 5 #include "content/renderer/media/mock_media_stream_video_sink.h"
6 6
7 #include "media/base/bind_to_current_loop.h" 7 #include "media/base/bind_to_current_loop.h"
8 8
9 namespace content { 9 namespace content {
10 10
(...skipping 11 matching lines...) Expand all
22 VideoCaptureDeliverFrameCB 22 VideoCaptureDeliverFrameCB
23 MockMediaStreamVideoSink::GetDeliverFrameCB() { 23 MockMediaStreamVideoSink::GetDeliverFrameCB() {
24 return media::BindToCurrentLoop( 24 return media::BindToCurrentLoop(
25 base::Bind( 25 base::Bind(
26 &MockMediaStreamVideoSink::DeliverVideoFrame, 26 &MockMediaStreamVideoSink::DeliverVideoFrame,
27 weak_factory_.GetWeakPtr())); 27 weak_factory_.GetWeakPtr()));
28 } 28 }
29 29
30 void MockMediaStreamVideoSink::DeliverVideoFrame( 30 void MockMediaStreamVideoSink::DeliverVideoFrame(
31 const scoped_refptr<media::VideoFrame>& frame, 31 const scoped_refptr<media::VideoFrame>& frame,
32 const media::VideoCaptureFormat& format) { 32 const media::VideoCaptureFormat& format,
33 const base::TimeTicks& estimated_capture_time) {
33 ++number_of_frames_; 34 ++number_of_frames_;
34 format_ = frame->format(); 35 format_ = frame->format();
35 frame_size_ = frame->natural_size(); 36 frame_size_ = frame->natural_size();
36 OnVideoFrame(); 37 OnVideoFrame();
37 } 38 }
38 39
39 void MockMediaStreamVideoSink::OnReadyStateChanged( 40 void MockMediaStreamVideoSink::OnReadyStateChanged(
40 blink::WebMediaStreamSource::ReadyState state) { 41 blink::WebMediaStreamSource::ReadyState state) {
41 state_ = state; 42 state_ = state;
42 } 43 }
43 44
44 void MockMediaStreamVideoSink::OnEnabledChanged(bool enabled) { 45 void MockMediaStreamVideoSink::OnEnabledChanged(bool enabled) {
45 enabled_ = enabled; 46 enabled_ = enabled;
46 } 47 }
47 48
48 } // namespace content 49 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/mock_media_stream_video_sink.h ('k') | content/renderer/media/mock_media_stream_video_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698