| 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_BASE_MAC_AVFOUNDATION_GLUE_H_ | 12 #ifndef MEDIA_BASE_MAC_AVFOUNDATION_GLUE_H_ |
| 13 #define MEDIA_BASE_MAC_AVFOUNDATION_GLUE_H_ | 13 #define MEDIA_BASE_MAC_AVFOUNDATION_GLUE_H_ |
| 14 | 14 |
| 15 #if defined(__OBJC__) | 15 #if defined(__OBJC__) |
| 16 #import <Foundation/Foundation.h> | 16 #import <Foundation/Foundation.h> |
| 17 #endif // defined(__OBJC__) | 17 #endif // defined(__OBJC__) |
| 18 | 18 |
| 19 #include "base/basictypes.h" | 19 #include "base/macros.h" |
| 20 #include "media/base/mac/coremedia_glue.h" | 20 #include "media/base/mac/coremedia_glue.h" |
| 21 #include "media/base/media_export.h" | 21 #include "media/base/media_export.h" |
| 22 | 22 |
| 23 class MEDIA_EXPORT AVFoundationGlue { | 23 class MEDIA_EXPORT AVFoundationGlue { |
| 24 public: | 24 public: |
| 25 // Must be called on the UI thread prior to attempting to use any other | 25 // Must be called on the UI thread prior to attempting to use any other |
| 26 // AVFoundation methods. | 26 // AVFoundation methods. |
| 27 static void InitializeAVFoundation(); | 27 static void InitializeAVFoundation(); |
| 28 | 28 |
| 29 // This method returns true if the OS version supports AVFoundation and the | 29 // This method returns true if the OS version supports AVFoundation and the |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 @interface AVCaptureDeviceInputGlue : NSObject | 173 @interface AVCaptureDeviceInputGlue : NSObject |
| 174 | 174 |
| 175 + (CrAVCaptureDeviceInput*)deviceInputWithDevice:(CrAVCaptureDevice*)device | 175 + (CrAVCaptureDeviceInput*)deviceInputWithDevice:(CrAVCaptureDevice*)device |
| 176 error:(NSError**)outError; | 176 error:(NSError**)outError; |
| 177 | 177 |
| 178 @end | 178 @end |
| 179 | 179 |
| 180 #endif // defined(__OBJC__) | 180 #endif // defined(__OBJC__) |
| 181 | 181 |
| 182 #endif // MEDIA_BASE_MAC_AVFOUNDATION_GLUE_H_ | 182 #endif // MEDIA_BASE_MAC_AVFOUNDATION_GLUE_H_ |
| OLD | NEW |