| 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 // AVFoundation API is only introduced in Mac OS X > 10.6, and there is only one | 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 | 6 // build of Chromium, so the (potential) linking with AVFoundation has to happen |
| 7 // in runtime. For this to be clean, an AVFoundationGlue class is defined to try | 7 // in runtime. For this to be clean, an AVFoundationGlue class is defined to try |
| 8 // and load these AVFoundation system libraries. If it succeeds, subsequent | 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 | 9 // clients can use AVFoundation via the rest of the classes declared in this |
| 10 // file. | 10 // file. |
| 11 | 11 |
| 12 #ifndef MEDIA_VIDEO_CAPTURE_MAC_AVFOUNDATION_GLUE_H_ | 12 #ifndef MEDIA_BASE_MAC_AVFOUNDATION_GLUE_H_ |
| 13 #define MEDIA_VIDEO_CAPTURE_MAC_AVFOUNDATION_GLUE_H_ | 13 #define MEDIA_BASE_MAC_AVFOUNDATION_GLUE_H_ |
| 14 | 14 |
| 15 #import <Foundation/Foundation.h> | 15 #import <Foundation/Foundation.h> |
| 16 | 16 |
| 17 #include "base/basictypes.h" | 17 #include "base/basictypes.h" |
| 18 #include "media/base/mac/coremedia_glue.h" |
| 18 #include "media/base/media_export.h" | 19 #include "media/base/media_export.h" |
| 19 #import "media/video/capture/mac/coremedia_glue.h" | |
| 20 | 20 |
| 21 class MEDIA_EXPORT AVFoundationGlue { | 21 class MEDIA_EXPORT AVFoundationGlue { |
| 22 public: | 22 public: |
| 23 // This method returns true if the OS version supports AVFoundation and the | 23 // This method returns true if the OS version supports AVFoundation and the |
| 24 // AVFoundation bundle could be loaded correctly, or false otherwise. | 24 // AVFoundation bundle could be loaded correctly, or false otherwise. |
| 25 static bool IsAVFoundationSupported(); | 25 static bool IsAVFoundationSupported(); |
| 26 | 26 |
| 27 static NSBundle const* AVFoundationBundle(); | 27 static NSBundle const* AVFoundationBundle(); |
| 28 | 28 |
| 29 static void* AVFoundationLibraryHandle(); | 29 static void* AVFoundationLibraryHandle(); |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 // Class to provide access to class methods of AVCaptureDeviceInput. | 162 // Class to provide access to class methods of AVCaptureDeviceInput. |
| 163 MEDIA_EXPORT | 163 MEDIA_EXPORT |
| 164 @interface AVCaptureDeviceInputGlue : NSObject | 164 @interface AVCaptureDeviceInputGlue : NSObject |
| 165 | 165 |
| 166 + (CrAVCaptureDeviceInput*)deviceInputWithDevice:(CrAVCaptureDevice*)device | 166 + (CrAVCaptureDeviceInput*)deviceInputWithDevice:(CrAVCaptureDevice*)device |
| 167 error:(NSError**)outError; | 167 error:(NSError**)outError; |
| 168 | 168 |
| 169 @end | 169 @end |
| 170 | 170 |
| 171 #endif // MEDIA_VIDEO_CAPTURE_MAC_AVFOUNDATION_GLUE_H_ | 171 #endif // MEDIA_BASE_MAC_AVFOUNDATION_GLUE_H_ |
| OLD | NEW |