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 // VideoCaptureDevice is the abstract base class for realizing video capture | 5 // VideoCaptureDevice is the abstract base class for realizing video capture |
6 // device support in Chromium. It provides the interface for OS dependent | 6 // device support in Chromium. It provides the interface for OS dependent |
7 // implementations. | 7 // implementations. |
8 // The class is created and functions are invoked on a thread owned by | 8 // The class is created and functions are invoked on a thread owned by |
9 // VideoCaptureManager. Capturing is done on other threads, depending on the OS | 9 // VideoCaptureManager. Capturing is done on other threads, depending on the OS |
10 // specific implementation. | 10 // specific implementation. |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 virtual void* data() const = 0; | 179 virtual void* data() const = 0; |
180 virtual size_t size() const = 0; | 180 virtual size_t size() const = 0; |
181 | 181 |
182 protected: | 182 protected: |
183 friend class base::RefCountedThreadSafe<Buffer>; | 183 friend class base::RefCountedThreadSafe<Buffer>; |
184 virtual ~Buffer() {} | 184 virtual ~Buffer() {} |
185 }; | 185 }; |
186 | 186 |
187 virtual ~Client() {} | 187 virtual ~Client() {} |
188 | 188 |
| 189 // TODO(kcwu): do we need this? |
| 190 virtual bool InitializeJpegDecoder() = 0; |
| 191 |
189 // Captured a new video frame, data for which is pointed to by |data|. | 192 // Captured a new video frame, data for which is pointed to by |data|. |
190 // | 193 // |
191 // The format of the frame is described by |frame_format|, and is assumed to | 194 // The format of the frame is described by |frame_format|, and is assumed to |
192 // be tightly packed. This method will try to reserve an output buffer and | 195 // be tightly packed. This method will try to reserve an output buffer and |
193 // copy from |data| into the output buffer. If no output buffer is | 196 // copy from |data| into the output buffer. If no output buffer is |
194 // available, the frame will be silently dropped. | 197 // available, the frame will be silently dropped. |
195 virtual void OnIncomingCapturedData(const uint8* data, | 198 virtual void OnIncomingCapturedData(const uint8* data, |
196 int length, | 199 int length, |
197 const VideoCaptureFormat& frame_format, | 200 const VideoCaptureFormat& frame_format, |
198 int rotation, // Clockwise. | 201 int rotation, // Clockwise. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 int GetPowerLineFrequencyForLocation() const; | 259 int GetPowerLineFrequencyForLocation() const; |
257 | 260 |
258 protected: | 261 protected: |
259 static const int kPowerLine50Hz = 50; | 262 static const int kPowerLine50Hz = 50; |
260 static const int kPowerLine60Hz = 60; | 263 static const int kPowerLine60Hz = 60; |
261 }; | 264 }; |
262 | 265 |
263 } // namespace media | 266 } // namespace media |
264 | 267 |
265 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ | 268 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ |
OLD | NEW |