| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MEDIA_CAPTURE_VIDEO_MAC_PLATFORM_VIDEO_CAPTURING_MAC_H_ | |
| 6 #define MEDIA_CAPTURE_VIDEO_MAC_PLATFORM_VIDEO_CAPTURING_MAC_H_ | |
| 7 | |
| 8 #import <Foundation/Foundation.h> | |
| 9 | |
| 10 namespace media { | |
| 11 class VideoCaptureDeviceMac; | |
| 12 } | |
| 13 | |
| 14 // Protocol representing platform-dependent video capture on Mac. | |
| 15 @protocol PlatformVideoCapturingMac<NSObject> | |
| 16 | |
| 17 // This method initializes the instance by calling NSObject |init| and registers | |
| 18 // internally a frame receiver at the same time. The frame receiver is supposed | |
| 19 // to be initialised before and outlive the VideoCapturingDeviceMac | |
| 20 // implementation. | |
| 21 - (id)initWithFrameReceiver:(media::VideoCaptureDeviceMac*)frameReceiver; | |
| 22 | |
| 23 // Sets the frame receiver. This method executes the registration in mutual | |
| 24 // exclusion. | |
| 25 // TODO(mcasas): This method and stopCapture() are always called in sequence and | |
| 26 // this one is only used to clear the frameReceiver, investigate if both can be | |
| 27 // merged. | |
| 28 - (void)setFrameReceiver:(media::VideoCaptureDeviceMac*)frameReceiver; | |
| 29 | |
| 30 // Sets which capture device to use by name passed as deviceId argument. The | |
| 31 // device names are usually obtained via VideoCaptureDevice::GetDeviceNames() | |
| 32 // method. This method will also configure all device properties except those in | |
| 33 // setCaptureHeight:width:frameRate. If |deviceId| is nil, capture is stopped | |
| 34 // and all potential configuration is torn down. Returns YES on success, NO | |
| 35 // otherwise. | |
| 36 - (BOOL)setCaptureDevice:(NSString*)deviceId; | |
| 37 | |
| 38 // Configures the capture properties. | |
| 39 - (BOOL)setCaptureHeight:(int)height | |
| 40 width:(int)width | |
| 41 frameRate:(float)frameRate; | |
| 42 | |
| 43 // Starts video capturing, registers observers. Returns YES on success, NO | |
| 44 // otherwise. | |
| 45 - (BOOL)startCapture; | |
| 46 | |
| 47 // Stops video capturing, unregisters observers. | |
| 48 - (void)stopCapture; | |
| 49 | |
| 50 @end | |
| 51 | |
| 52 #endif // MEDIA_CAPTURE_VIDEO_MAC_PLATFORM_VIDEO_CAPTURING_MAC_H_ | |
| OLD | NEW |