Chromium Code Reviews| Index: media/video/capture/mac/avfoundation_glue.h |
| diff --git a/media/video/capture/mac/avfoundation_glue.h b/media/video/capture/mac/avfoundation_glue.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b87162d7254699507f654485d612fc6202e67c37 |
| --- /dev/null |
| +++ b/media/video/capture/mac/avfoundation_glue.h |
| @@ -0,0 +1,45 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// AVFoundation API is only introduced in Mac OS X > 10.6, and there is only one |
| +// build of Chromium, so the (potential) linking with AVFoundation has to happen |
| +// in runtime. For this to be clean, a AVFoundationGlue class is defined to try |
| +// and load these AVFoundation system libraries. If it succeeds, subsequent |
| +// clients can use AVFoundation via the rest of the classes declared in this |
| +// file. |
| + |
| +#ifndef MEDIA_VIDEO_CAPTURE_MAC_AVFOUNDATION_GLUE_H_ |
| +#define MEDIA_VIDEO_CAPTURE_MAC_AVFOUNDATION_GLUE_H_ |
| + |
| +#import <Foundation/Foundation.h> |
| + |
| +@interface AVFoundationGlue : NSObject |
| + |
| +// This method returns YES if the OS version supports AVFoundation and the |
| +// AVFoundation bundle could be loaded correctly, or NO otherwise. |
| ++ (BOOL)isAVFoundationSupported; |
| + |
| ++ (NSBundle*)avFoundationBundle; |
| + |
| +// Originally coming from AVCaptureDevice.h but in global namespace. |
| ++ (NSString *const)avCaptureDeviceWasConnectedNotification; |
|
Mark Mentovai
2013/10/01 18:53:23
Be consistent with your spacing on the *s. You did
mcasas
2013/10/02 14:10:39
Done.
|
| ++ (NSString *const)avCaptureDeviceWasDisconnectedNotification; |
| + |
| +// Originally coming from AVMediaFormat.h but in global namespace. |
| ++ (NSString *const)avMediaTypeVideo; |
| ++ (NSString *const)avMediaTypeAudio; |
| ++ (NSString *const)avMediaTypeMuxed; |
| + |
| +@end // @interface AVFoundationGlue |
| + |
| +// Coming from AVCaptureDevice.h |
| +@interface AVCaptureDeviceGlue : NSObject |
| + |
| ++ (NSArray*)devices; |
| + |
| ++ (BOOL)hasMediaType:(NSString *)mediaType forId:(id)device; |
| + |
| +@end |
| + |
| +#endif // MEDIA_VIDEO_CAPTURE_MAC_AVFOUNDATION_GLUE_H_ |