| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 case VIDEO_CAPTURE_STATE_ERROR: | 131 case VIDEO_CAPTURE_STATE_ERROR: |
| 132 handler_->OnError(); | 132 handler_->OnError(); |
| 133 break; | 133 break; |
| 134 default: | 134 default: |
| 135 NOTREACHED() << "Unexpected state: " << state << "."; | 135 NOTREACHED() << "Unexpected state: " << state << "."; |
| 136 } | 136 } |
| 137 } | 137 } |
| 138 | 138 |
| 139 void PepperPlatformVideoCapture::OnFrameReady( | 139 void PepperPlatformVideoCapture::OnFrameReady( |
| 140 const scoped_refptr<media::VideoFrame>& frame, | 140 const scoped_refptr<media::VideoFrame>& frame, |
| 141 const media::VideoCaptureFormat& format) { | 141 const media::VideoCaptureFormat& format, |
| 142 const base::TimeTicks& estimated_capture_time) { |
| 142 if (handler_ && !stop_capture_cb_.is_null()) | 143 if (handler_ && !stop_capture_cb_.is_null()) |
| 143 handler_->OnFrameReady(frame, format); | 144 handler_->OnFrameReady(frame, format); |
| 144 } | 145 } |
| 145 | 146 |
| 146 PepperMediaDeviceManager* PepperPlatformVideoCapture::GetMediaDeviceManager() { | 147 PepperMediaDeviceManager* PepperPlatformVideoCapture::GetMediaDeviceManager() { |
| 147 return PepperMediaDeviceManager::GetForRenderView(render_view_.get()); | 148 return PepperMediaDeviceManager::GetForRenderView(render_view_.get()); |
| 148 } | 149 } |
| 149 | 150 |
| 150 } // namespace content | 151 } // namespace content |
| OLD | NEW |