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 // VideoCaptureImplManager manages video capture devices in renderer process. | 5 // VideoCaptureImplManager manages video capture devices in renderer process. |
6 // The video capture clients use AddDevice() to get a pointer to | 6 // The video capture clients use AddDevice() to get a pointer to |
7 // video capture device. VideoCaputreImplManager supports multiple clients | 7 // video capture device. VideoCaputreImplManager supports multiple clients |
8 // accessing same device. | 8 // accessing same device. |
9 | 9 |
10 #ifndef CONTENT_RENDERER_MEDIA_VIDEO_CAPTURE_IMPL_MANAGER_H_ | 10 #ifndef CONTENT_RENDERER_MEDIA_VIDEO_CAPTURE_IMPL_MANAGER_H_ |
(...skipping 24 matching lines...) Expand all Loading... |
35 // operate on that pointer, such as StartCaptrue, StopCapture. | 35 // operate on that pointer, such as StartCaptrue, StopCapture. |
36 virtual media::VideoCapture* AddDevice( | 36 virtual media::VideoCapture* AddDevice( |
37 media::VideoCaptureSessionId id, | 37 media::VideoCaptureSessionId id, |
38 media::VideoCapture::EventHandler* handler); | 38 media::VideoCapture::EventHandler* handler); |
39 | 39 |
40 // Called by video capture client |handler| to remove device referenced | 40 // Called by video capture client |handler| to remove device referenced |
41 // by |id| from VideoCaptureImplManager's list of opened device list. | 41 // by |id| from VideoCaptureImplManager's list of opened device list. |
42 virtual void RemoveDevice(media::VideoCaptureSessionId id, | 42 virtual void RemoveDevice(media::VideoCaptureSessionId id, |
43 media::VideoCapture::EventHandler* handler); | 43 media::VideoCapture::EventHandler* handler); |
44 | 44 |
| 45 // Make all existing VideoCaptureImpl instances stop/resume delivering |
| 46 // video frames to their clients, depends on flag |suspend|. |
| 47 virtual void SuspendDevices(bool suspend); |
| 48 |
45 VideoCaptureMessageFilter* video_capture_message_filter() const { | 49 VideoCaptureMessageFilter* video_capture_message_filter() const { |
46 return filter_; | 50 return filter_; |
47 } | 51 } |
48 | 52 |
49 protected: | 53 protected: |
50 virtual ~VideoCaptureImplManager(); | 54 virtual ~VideoCaptureImplManager(); |
51 | 55 |
52 private: | 56 private: |
53 friend class base::RefCountedThreadSafe<VideoCaptureImplManager>; | 57 friend class base::RefCountedThreadSafe<VideoCaptureImplManager>; |
54 | 58 |
(...skipping 14 matching lines...) Expand all Loading... |
69 scoped_refptr<VideoCaptureMessageFilter> filter_; | 73 scoped_refptr<VideoCaptureMessageFilter> filter_; |
70 base::Thread thread_; | 74 base::Thread thread_; |
71 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; | 75 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; |
72 | 76 |
73 DISALLOW_COPY_AND_ASSIGN(VideoCaptureImplManager); | 77 DISALLOW_COPY_AND_ASSIGN(VideoCaptureImplManager); |
74 }; | 78 }; |
75 | 79 |
76 } // namespace content | 80 } // namespace content |
77 | 81 |
78 #endif // CONTENT_RENDERER_MEDIA_VIDEO_CAPTURE_IMPL_MANAGER_H_ | 82 #endif // CONTENT_RENDERER_MEDIA_VIDEO_CAPTURE_IMPL_MANAGER_H_ |
OLD | NEW |