| 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 // AVFoundation API is only introduced in Mac OS X > 10.6, and there is only one |
| 6 // build of Chromium, so the (potential) linking with AVFoundation has to happen |
| 7 // in runtime. For this to be clean, a AVFoundationGlue class is defined to try |
| 8 // and load these AVFoundation system libraries. If it succeeds, subsequent |
| 9 // clients can use AVFoundation via the rest of the classes declared in this |
| 10 // file. |
| 11 |
| 12 #ifndef MEDIA_VIDEO_CAPTURE_MAC_AVFOUNDATION_GLUE_H_ |
| 13 #define MEDIA_VIDEO_CAPTURE_MAC_AVFOUNDATION_GLUE_H_ |
| 14 |
| 15 #import <Foundation/Foundation.h> |
| 16 |
| 17 @interface AVFoundationGlue : NSObject |
| 18 |
| 19 // This method returns YES if the OS version supports AVFoundation and the |
| 20 // AVFoundation bundle could be loaded correctly, or NO otherwise. |
| 21 + (BOOL)isAVFoundationSupported; |
| 22 |
| 23 + (NSBundle const*)avFoundationBundle; |
| 24 |
| 25 + (void*)avFoundationLibraryHandle; |
| 26 |
| 27 // Originally coming from AVCaptureDevice.h but in global namespace. |
| 28 + (NSString* const)avCaptureDeviceWasConnectedNotification; |
| 29 + (NSString* const)avCaptureDeviceWasDisconnectedNotification; |
| 30 |
| 31 // Originally coming from AVMediaFormat.h but in global namespace. |
| 32 + (NSString* const)avMediaTypeVideo; |
| 33 + (NSString* const)avMediaTypeAudio; |
| 34 + (NSString* const)avMediaTypeMuxed; |
| 35 |
| 36 + (NSString* const)readNSStringPtr:(char const* const)symbol |
| 37 fromLibrary:(void* const)handle; |
| 38 |
| 39 @end // @interface AVFoundationGlue |
| 40 |
| 41 |
| 42 // Originally AVCaptureDevice and coming from AVCaptureDevice.h |
| 43 @interface CrAVCaptureDevice : NSObject |
| 44 |
| 45 - (BOOL)hasMediaType:(NSString const*)mediaType; |
| 46 |
| 47 @end |
| 48 |
| 49 @interface AVCaptureDeviceGlue : NSObject |
| 50 |
| 51 + (NSArray*)devices; |
| 52 |
| 53 + (BOOL)hasMediaType:(NSString const*)mediaType |
| 54 forCaptureDevice:(CrAVCaptureDevice const*)device; |
| 55 |
| 56 @end |
| 57 |
| 58 #endif // MEDIA_VIDEO_CAPTURE_MAC_AVFOUNDATION_GLUE_H_ |
| OLD | NEW |