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