| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/pepper/pepper_platform_video_capture.h" | 5 #include "content/renderer/pepper/pepper_platform_video_capture.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
| 10 #include "content/renderer/media/video_capture_impl_manager.h" | 10 #include "content/renderer/media/video_capture_impl_manager.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 case VIDEO_CAPTURE_STATE_ERROR: | 135 case VIDEO_CAPTURE_STATE_ERROR: |
| 136 handler_->OnError(); | 136 handler_->OnError(); |
| 137 break; | 137 break; |
| 138 default: | 138 default: |
| 139 NOTREACHED() << "Unexpected state: " << state << "."; | 139 NOTREACHED() << "Unexpected state: " << state << "."; |
| 140 } | 140 } |
| 141 } | 141 } |
| 142 | 142 |
| 143 void PepperPlatformVideoCapture::OnFrameReady( | 143 void PepperPlatformVideoCapture::OnFrameReady( |
| 144 const scoped_refptr<media::VideoFrame>& frame, | 144 const scoped_refptr<media::VideoFrame>& frame, |
| 145 const media::VideoCaptureFormat& format, | |
| 146 const base::TimeTicks& estimated_capture_time) { | 145 const base::TimeTicks& estimated_capture_time) { |
| 147 if (handler_ && !stop_capture_cb_.is_null()) | 146 if (handler_ && !stop_capture_cb_.is_null()) |
| 148 handler_->OnFrameReady(frame, format); | 147 handler_->OnFrameReady(frame); |
| 149 } | 148 } |
| 150 | 149 |
| 151 PepperMediaDeviceManager* PepperPlatformVideoCapture::GetMediaDeviceManager() { | 150 PepperMediaDeviceManager* PepperPlatformVideoCapture::GetMediaDeviceManager() { |
| 152 RenderFrameImpl* const render_frame = | 151 RenderFrameImpl* const render_frame = |
| 153 RenderFrameImpl::FromRoutingID(render_frame_id_); | 152 RenderFrameImpl::FromRoutingID(render_frame_id_); |
| 154 return render_frame ? | 153 return render_frame ? |
| 155 PepperMediaDeviceManager::GetForRenderFrame(render_frame).get() : NULL; | 154 PepperMediaDeviceManager::GetForRenderFrame(render_frame).get() : NULL; |
| 156 } | 155 } |
| 157 | 156 |
| 158 } // namespace content | 157 } // namespace content |
| OLD | NEW |