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 commonly used definitions of video capture. | 5 // This file contains commonly used definitions of video capture. |
6 | 6 |
7 #ifndef CONTENT_COMMON_MEDIA_VIDEO_CAPTURE_H_ | 7 #ifndef CONTENT_COMMON_MEDIA_VIDEO_CAPTURE_H_ |
8 #define CONTENT_COMMON_MEDIA_VIDEO_CAPTURE_H_ | 8 #define CONTENT_COMMON_MEDIA_VIDEO_CAPTURE_H_ |
9 | 9 |
| 10 #include "base/time/time.h" |
| 11 #include "media/base/video_frame.h" |
| 12 #include "media/video/capture/video_capture_types.h" |
| 13 |
10 namespace content { | 14 namespace content { |
11 | 15 |
12 // Current status of the video capture device. It's used by multiple classes | 16 // Current status of the video capture device. It's used by multiple classes |
13 // in browser process and renderer process. | 17 // in browser process and renderer process. |
14 // Browser process sends information about the current capture state and | 18 // Browser process sends information about the current capture state and |
15 // error to the renderer process using this type. | 19 // error to the renderer process using this type. |
16 enum VideoCaptureState { | 20 enum VideoCaptureState { |
17 VIDEO_CAPTURE_STATE_STARTING, | 21 VIDEO_CAPTURE_STATE_STARTING, |
18 VIDEO_CAPTURE_STATE_STARTED, | 22 VIDEO_CAPTURE_STATE_STARTED, |
19 VIDEO_CAPTURE_STATE_PAUSED, | 23 VIDEO_CAPTURE_STATE_PAUSED, |
20 VIDEO_CAPTURE_STATE_STOPPING, | 24 VIDEO_CAPTURE_STATE_STOPPING, |
21 VIDEO_CAPTURE_STATE_STOPPED, | 25 VIDEO_CAPTURE_STATE_STOPPED, |
22 VIDEO_CAPTURE_STATE_ERROR, | 26 VIDEO_CAPTURE_STATE_ERROR, |
23 VIDEO_CAPTURE_STATE_ENDED, | 27 VIDEO_CAPTURE_STATE_ENDED, |
24 VIDEO_CAPTURE_STATE_LAST = VIDEO_CAPTURE_STATE_ENDED | 28 VIDEO_CAPTURE_STATE_LAST = VIDEO_CAPTURE_STATE_ENDED |
25 }; | 29 }; |
26 | 30 |
| 31 typedef base::Callback<void(VideoCaptureState)> |
| 32 VideoCaptureStateUpdateCB; |
| 33 typedef base::Callback<void(const media::VideoCaptureFormats&)> |
| 34 VideoCaptureDeviceFormatsCB; |
| 35 typedef base::Callback< |
| 36 void(const scoped_refptr<media::VideoFrame>&, |
| 37 const media::VideoCaptureFormat&, |
| 38 const base::TimeTicks&)> |
| 39 VideoCaptureDeliverFrameCB; |
| 40 |
27 } // namespace content | 41 } // namespace content |
28 | 42 |
29 #endif // CONTENT_COMMON_MEDIA_VIDEO_CAPTURE_H_ | 43 #endif // CONTENT_COMMON_MEDIA_VIDEO_CAPTURE_H_ |
OLD | NEW |