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 MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_PROXY_H_ | 5 #ifndef MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_PROXY_H_ |
6 #define MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_PROXY_H_ | 6 #define MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_PROXY_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "media/video/capture/video_capture.h" | 10 #include "media/video/capture/video_capture.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // VideoCapture::EventHandler implementation, called on VC thread. | 47 // VideoCapture::EventHandler implementation, called on VC thread. |
48 virtual void OnStarted(VideoCapture* capture) OVERRIDE; | 48 virtual void OnStarted(VideoCapture* capture) OVERRIDE; |
49 virtual void OnStopped(VideoCapture* capture) OVERRIDE; | 49 virtual void OnStopped(VideoCapture* capture) OVERRIDE; |
50 virtual void OnPaused(VideoCapture* capture) OVERRIDE; | 50 virtual void OnPaused(VideoCapture* capture) OVERRIDE; |
51 virtual void OnError(VideoCapture* capture, int error_code) OVERRIDE; | 51 virtual void OnError(VideoCapture* capture, int error_code) OVERRIDE; |
52 virtual void OnRemoved(VideoCapture* capture) OVERRIDE; | 52 virtual void OnRemoved(VideoCapture* capture) OVERRIDE; |
53 virtual void OnFrameReady(VideoCapture* capture, | 53 virtual void OnFrameReady(VideoCapture* capture, |
54 const scoped_refptr<VideoFrame>& frame) OVERRIDE; | 54 const scoped_refptr<VideoFrame>& frame) OVERRIDE; |
55 virtual void OnDeviceInfoReceived( | 55 virtual void OnDeviceInfoReceived( |
56 VideoCapture* capture, | 56 VideoCapture* capture, |
57 const VideoCaptureParams& device_info) OVERRIDE; | 57 const VideoCaptureFormat& device_info) OVERRIDE; |
58 | 58 |
59 private: | 59 private: |
60 // Called on main thread. | 60 // Called on main thread. |
61 void OnStartedOnMainThread( | 61 void OnStartedOnMainThread( |
62 VideoCapture* capture, | 62 VideoCapture* capture, |
63 const VideoCaptureState& state); | 63 const VideoCaptureState& state); |
64 void OnStoppedOnMainThread( | 64 void OnStoppedOnMainThread( |
65 VideoCapture* capture, | 65 VideoCapture* capture, |
66 const VideoCaptureState& state); | 66 const VideoCaptureState& state); |
67 void OnPausedOnMainThread( | 67 void OnPausedOnMainThread( |
68 VideoCapture* capture, | 68 VideoCapture* capture, |
69 const VideoCaptureState& state); | 69 const VideoCaptureState& state); |
70 void OnErrorOnMainThread( | 70 void OnErrorOnMainThread( |
71 VideoCapture* capture, | 71 VideoCapture* capture, |
72 const VideoCaptureState& state, | 72 const VideoCaptureState& state, |
73 int error_code); | 73 int error_code); |
74 void OnRemovedOnMainThread( | 74 void OnRemovedOnMainThread( |
75 VideoCapture* capture, | 75 VideoCapture* capture, |
76 const VideoCaptureState& state); | 76 const VideoCaptureState& state); |
77 void OnFrameReadyOnMainThread(VideoCapture* capture, | 77 void OnFrameReadyOnMainThread(VideoCapture* capture, |
78 const VideoCaptureState& state, | 78 const VideoCaptureState& state, |
79 const scoped_refptr<VideoFrame>& frame); | 79 const scoped_refptr<VideoFrame>& frame); |
80 void OnDeviceInfoReceivedOnMainThread(VideoCapture* capture, | 80 void OnDeviceInfoReceivedOnMainThread(VideoCapture* capture, |
81 const VideoCaptureState& state, | 81 const VideoCaptureState& state, |
82 const VideoCaptureParams& device_info); | 82 const VideoCaptureFormat& device_info); |
83 | 83 |
84 // Only accessed from main thread. | 84 // Only accessed from main thread. |
85 VideoCapture::EventHandler* proxied_; | 85 VideoCapture::EventHandler* proxied_; |
86 VideoCaptureState state_; | 86 VideoCaptureState state_; |
87 | 87 |
88 scoped_refptr<base::MessageLoopProxy> main_message_loop_; | 88 scoped_refptr<base::MessageLoopProxy> main_message_loop_; |
89 }; | 89 }; |
90 | 90 |
91 } // namespace media | 91 } // namespace media |
92 | 92 |
93 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_PROXY_H_ | 93 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_PROXY_H_ |
OLD | NEW |