Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(652)

Unified Diff: media/base/mac/avfoundation_glue.h

Issue 1153063002: Initialize AVFoundation explicitly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add perf trace for InitializeAVFoundation and revert changes in browser_test_base.cc Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | media/base/mac/avfoundation_glue.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/mac/avfoundation_glue.h
diff --git a/media/base/mac/avfoundation_glue.h b/media/base/mac/avfoundation_glue.h
index c1b8aa8f0edb05f11a6aac2c3a56e892c4acb3ae..df54ae0aed96229efafd6a808de9d4f3d6ca3b45 100644
--- a/media/base/mac/avfoundation_glue.h
+++ b/media/base/mac/avfoundation_glue.h
@@ -12,7 +12,9 @@
#ifndef MEDIA_BASE_MAC_AVFOUNDATION_GLUE_H_
#define MEDIA_BASE_MAC_AVFOUNDATION_GLUE_H_
+#if defined(__OBJC__)
#import <Foundation/Foundation.h>
+#endif // defined(__OBJC__)
#include "base/basictypes.h"
#include "media/base/mac/coremedia_glue.h"
@@ -20,10 +22,15 @@
class MEDIA_EXPORT AVFoundationGlue {
public:
+ // Must be called on the UI thread prior to attempting to use any other
+ // AVFoundation methods.
+ static void InitializeAVFoundation();
+
// This method returns true if the OS version supports AVFoundation and the
// AVFoundation bundle could be loaded correctly, or false otherwise.
static bool IsAVFoundationSupported();
+#if defined(__OBJC__)
static NSBundle const* AVFoundationBundle();
// Originally coming from AVCaptureDevice.h but in global namespace.
@@ -46,11 +53,14 @@ class MEDIA_EXPORT AVFoundationGlue {
static Class AVCaptureSessionClass();
static Class AVCaptureVideoDataOutputClass();
+#endif // defined(__OBJC__)
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(AVFoundationGlue);
};
+#if defined(__OBJC__)
+
// Originally AVCaptureDevice and coming from AVCaptureDevice.h
MEDIA_EXPORT
@interface CrAVCaptureDevice : NSObject
@@ -167,4 +177,6 @@ MEDIA_EXPORT
@end
+#endif // defined(__OBJC__)
+
#endif // MEDIA_BASE_MAC_AVFOUNDATION_GLUE_H_
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | media/base/mac/avfoundation_glue.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698