OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This file contains abstract classes used for media filter to handle video | 5 // This file contains abstract classes used for media filter to handle video |
6 // capture devices. | 6 // capture devices. |
7 | 7 |
8 #ifndef MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_H_ | 8 #ifndef MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_H_ |
9 #define MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_H_ | 9 #define MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_H_ |
10 | 10 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 90 |
91 VideoCapture() {} | 91 VideoCapture() {} |
92 virtual ~VideoCapture() {} | 92 virtual ~VideoCapture() {} |
93 | 93 |
94 // Request video capture to start capturing with |capability|. | 94 // Request video capture to start capturing with |capability|. |
95 // Also register |handler| with video capture for event handling. | 95 // Also register |handler| with video capture for event handling. |
96 virtual void StartCapture(EventHandler* handler, | 96 virtual void StartCapture(EventHandler* handler, |
97 const VideoCaptureCapability& capability) = 0; | 97 const VideoCaptureCapability& capability) = 0; |
98 | 98 |
99 // Request video capture to stop capturing for client |handler|. | 99 // Request video capture to stop capturing for client |handler|. |
100 virtual void StopCapture(EventHandler* handler) = 0; | 100 virtual void StopCapture(EventHandler* handler, bool need_notification) = 0; |
101 | 101 |
102 // Feed buffer to video capture when done with it. | 102 // Feed buffer to video capture when done with it. |
103 virtual void FeedBuffer(scoped_refptr<VideoFrameBuffer> buffer) = 0; | 103 virtual void FeedBuffer(scoped_refptr<VideoFrameBuffer> buffer) = 0; |
104 | 104 |
105 virtual bool CaptureStarted() = 0; | 105 virtual bool CaptureStarted() = 0; |
106 virtual int CaptureWidth() = 0; | 106 virtual int CaptureWidth() = 0; |
107 virtual int CaptureHeight() = 0; | 107 virtual int CaptureHeight() = 0; |
108 virtual int CaptureFrameRate() = 0; | 108 virtual int CaptureFrameRate() = 0; |
109 | 109 |
110 private: | 110 private: |
111 DISALLOW_COPY_AND_ASSIGN(VideoCapture); | 111 DISALLOW_COPY_AND_ASSIGN(VideoCapture); |
112 }; | 112 }; |
113 | 113 |
114 } // namespace media | 114 } // namespace media |
115 | 115 |
116 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_H_ | 116 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_H_ |
OLD | NEW |