| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "media/video/capture/video_capture_proxy.h" | 5 #include "media/video/capture/video_capture_proxy.h" | 
| 6 | 6 | 
| 7 #include "base/bind.h" | 7 #include "base/bind.h" | 
| 8 #include "base/location.h" | 8 #include "base/location.h" | 
| 9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" | 
|  | 10 #include "media/base/video_frame.h" | 
| 10 | 11 | 
| 11 namespace { | 12 namespace { | 
| 12 | 13 | 
| 13 // Called on VC thread: extracts the state out of the VideoCapture, and | 14 // Called on VC thread: extracts the state out of the VideoCapture, and | 
| 14 // serialize it into a VideoCaptureState. | 15 // serialize it into a VideoCaptureState. | 
| 15 media::VideoCaptureHandlerProxy::VideoCaptureState GetState( | 16 media::VideoCaptureHandlerProxy::VideoCaptureState GetState( | 
| 16     media::VideoCapture* capture) { | 17     media::VideoCapture* capture) { | 
| 17   media::VideoCaptureHandlerProxy::VideoCaptureState state; | 18   media::VideoCaptureHandlerProxy::VideoCaptureState state; | 
| 18   state.started = capture->CaptureStarted(); | 19   state.started = capture->CaptureStarted(); | 
| 19   state.frame_rate = capture->CaptureFrameRate(); | 20   state.frame_rate = capture->CaptureFrameRate(); | 
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 125 | 126 | 
| 126 void VideoCaptureHandlerProxy::OnFrameReadyOnMainThread( | 127 void VideoCaptureHandlerProxy::OnFrameReadyOnMainThread( | 
| 127     VideoCapture* capture, | 128     VideoCapture* capture, | 
| 128     const VideoCaptureState& state, | 129     const VideoCaptureState& state, | 
| 129     const scoped_refptr<VideoFrame>& frame) { | 130     const scoped_refptr<VideoFrame>& frame) { | 
| 130   state_ = state; | 131   state_ = state; | 
| 131   proxied_->OnFrameReady(capture, frame); | 132   proxied_->OnFrameReady(capture, frame); | 
| 132 } | 133 } | 
| 133 | 134 | 
| 134 }  // namespace media | 135 }  // namespace media | 
| OLD | NEW | 
|---|