OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_AVFOUNDATION_MAC_H_ | 5 #ifndef MEDIA_CAPTURE_VIDEO_MAC_VIDEO_CAPTURE_DEVICE_AVFOUNDATION_MAC_H_ |
6 #define MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_AVFOUNDATION_MAC_H_ | 6 #define MEDIA_CAPTURE_VIDEO_MAC_VIDEO_CAPTURE_DEVICE_AVFOUNDATION_MAC_H_ |
7 | 7 |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 | 9 |
10 #import "base/mac/scoped_nsobject.h" | 10 #import "base/mac/scoped_nsobject.h" |
11 #include "base/synchronization/lock.h" | 11 #include "base/synchronization/lock.h" |
12 #include "base/threading/thread_checker.h" | 12 #include "base/threading/thread_checker.h" |
13 #import "media/base/mac/avfoundation_glue.h" | 13 #import "media/base/mac/avfoundation_glue.h" |
14 #include "media/base/video_capture_types.h" | 14 #include "media/base/video_capture_types.h" |
15 #import "media/capture/video/mac/platform_video_capturing_mac.h" | 15 #import "media/capture/video/mac/platform_video_capturing_mac.h" |
16 #include "media/capture/video/video_capture_device.h" | 16 #include "media/capture/video/video_capture_device.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // frame receiver. | 91 // frame receiver. |
92 - (id)initWithFrameReceiver:(media::VideoCaptureDeviceMac*)frameReceiver; | 92 - (id)initWithFrameReceiver:(media::VideoCaptureDeviceMac*)frameReceiver; |
93 | 93 |
94 // Sets the frame receiver. | 94 // Sets the frame receiver. |
95 - (void)setFrameReceiver:(media::VideoCaptureDeviceMac*)frameReceiver; | 95 - (void)setFrameReceiver:(media::VideoCaptureDeviceMac*)frameReceiver; |
96 | 96 |
97 // Sets which capture device to use by name, retrieved via |deviceNames|. Once | 97 // Sets which capture device to use by name, retrieved via |deviceNames|. Once |
98 // the deviceId is known, the library objects are created if needed and | 98 // the deviceId is known, the library objects are created if needed and |
99 // connected for the capture, and a by default resolution is set. If deviceId is | 99 // connected for the capture, and a by default resolution is set. If deviceId is |
100 // nil, then the eventual capture is stopped and library objects are | 100 // nil, then the eventual capture is stopped and library objects are |
101 // disconnected. Returns YES on sucess, NO otherwise. This method should not be | 101 // disconnected. Returns YES on success, NO otherwise. This method should not be |
102 // called during capture. | 102 // called during capture. |
103 - (BOOL)setCaptureDevice:(NSString*)deviceId; | 103 - (BOOL)setCaptureDevice:(NSString*)deviceId; |
104 | 104 |
105 // Configures the capture properties for the capture session and the video data | 105 // Configures the capture properties for the capture session and the video data |
106 // output; this means it MUST be called after setCaptureDevice:. Return YES on | 106 // output; this means it MUST be called after setCaptureDevice:. Return YES on |
107 // success, else NO. | 107 // success, else NO. |
108 - (BOOL)setCaptureHeight:(int)height | 108 - (BOOL)setCaptureHeight:(int)height |
109 width:(int)width | 109 width:(int)width |
110 frameRate:(float)frameRate; | 110 frameRate:(float)frameRate; |
111 | 111 |
112 // Starts video capturing and register the notification listeners. Must be | 112 // Starts video capturing and register the notification listeners. Must be |
113 // called after setCaptureDevice:, and, eventually, also after | 113 // called after setCaptureDevice:, and, eventually, also after |
114 // setCaptureHeight:width:frameRate:. Returns YES on sucess, NO otherwise. | 114 // setCaptureHeight:width:frameRate:. Returns YES on success, NO otherwise. |
115 - (BOOL)startCapture; | 115 - (BOOL)startCapture; |
116 | 116 |
117 // Stops video capturing and stops listening to notifications. | 117 // Stops video capturing and stops listening to notifications. |
118 - (void)stopCapture; | 118 - (void)stopCapture; |
119 | 119 |
120 @end | 120 @end |
121 | 121 |
122 #endif // MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_AVFOUNDATION_MAC_H_ | 122 #endif // MEDIA_CAPTURE_VIDEO_MAC_VIDEO_CAPTURE_DEVICE_AVFOUNDATION_MAC_H_ |
OLD | NEW |