| 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 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_VIDEO_CAPTURE_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_VIDEO_CAPTURE_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_VIDEO_CAPTURE_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_VIDEO_CAPTURE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 // Detaches the event handler and stops sending notifications to it. | 35 // Detaches the event handler and stops sending notifications to it. |
| 36 void DetachEventHandler(); | 36 void DetachEventHandler(); |
| 37 | 37 |
| 38 void StartCapture(const media::VideoCaptureParams& params); | 38 void StartCapture(const media::VideoCaptureParams& params); |
| 39 void StopCapture(); | 39 void StopCapture(); |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 void OnDeviceOpened(int request_id, bool succeeded, const std::string& label); | 42 void OnDeviceOpened(int request_id, bool succeeded, const std::string& label); |
| 43 void OnStateUpdate(VideoCaptureState state); | 43 void OnStateUpdate(VideoCaptureState state); |
| 44 void OnFrameReady(const scoped_refptr<media::VideoFrame>& frame, | 44 void OnFrameReady(const scoped_refptr<media::VideoFrame>& frame, |
| 45 const base::TimeTicks& estimated_capture_time); | 45 base::TimeTicks estimated_capture_time); |
| 46 | 46 |
| 47 // Can return NULL if the RenderFrame referenced by |render_frame_id_| has | 47 // Can return NULL if the RenderFrame referenced by |render_frame_id_| has |
| 48 // gone away. | 48 // gone away. |
| 49 PepperMediaDeviceManager* GetMediaDeviceManager(); | 49 PepperMediaDeviceManager* GetMediaDeviceManager(); |
| 50 | 50 |
| 51 const int render_frame_id_; | 51 const int render_frame_id_; |
| 52 const std::string device_id_; | 52 const std::string device_id_; |
| 53 | 53 |
| 54 std::string label_; | 54 std::string label_; |
| 55 int session_id_; | 55 int session_id_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 66 base::ThreadChecker thread_checker_; | 66 base::ThreadChecker thread_checker_; |
| 67 | 67 |
| 68 base::WeakPtrFactory<PepperPlatformVideoCapture> weak_factory_; | 68 base::WeakPtrFactory<PepperPlatformVideoCapture> weak_factory_; |
| 69 | 69 |
| 70 DISALLOW_COPY_AND_ASSIGN(PepperPlatformVideoCapture); | 70 DISALLOW_COPY_AND_ASSIGN(PepperPlatformVideoCapture); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 } // namespace content | 73 } // namespace content |
| 74 | 74 |
| 75 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_VIDEO_CAPTURE_H_ | 75 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_VIDEO_CAPTURE_H_ |
| OLD | NEW |