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 media::VideoCaptureFormat& format, | |
46 const base::TimeTicks& estimated_capture_time); | 45 const base::TimeTicks& estimated_capture_time); |
47 | 46 |
48 // 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 |
49 // gone away. | 48 // gone away. |
50 PepperMediaDeviceManager* GetMediaDeviceManager(); | 49 PepperMediaDeviceManager* GetMediaDeviceManager(); |
51 | 50 |
52 const int render_frame_id_; | 51 const int render_frame_id_; |
53 const std::string device_id_; | 52 const std::string device_id_; |
54 | 53 |
55 std::string label_; | 54 std::string label_; |
(...skipping 11 matching lines...) Expand all Loading... |
67 base::ThreadChecker thread_checker_; | 66 base::ThreadChecker thread_checker_; |
68 | 67 |
69 base::WeakPtrFactory<PepperPlatformVideoCapture> weak_factory_; | 68 base::WeakPtrFactory<PepperPlatformVideoCapture> weak_factory_; |
70 | 69 |
71 DISALLOW_COPY_AND_ASSIGN(PepperPlatformVideoCapture); | 70 DISALLOW_COPY_AND_ASSIGN(PepperPlatformVideoCapture); |
72 }; | 71 }; |
73 | 72 |
74 } // namespace content | 73 } // namespace content |
75 | 74 |
76 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_VIDEO_CAPTURE_H_ | 75 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_VIDEO_CAPTURE_H_ |
OLD | NEW |