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

Unified Diff: media/video/capture/mac/avfoundation_glue.h

Issue 24615005: Added AVFoundation Glue and Device Monitoring for Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
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..eccf2e3a15fb6a01f81821faa3585922a88325a4
--- /dev/null
+++ b/media/video/capture/mac/avfoundation_glue.h
@@ -0,0 +1,39 @@
+// 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.
+
+#ifndef MEDIA_VIDEO_CAPTURE_MAC_AVFOUNDATION_GLUE_H_
+#define MEDIA_VIDEO_CAPTURE_MAC_AVFOUNDATION_GLUE_H_
+
Mark Mentovai 2013/09/26 17:09:10 You need a comment saying why we have to do this i
mcasas 2013/09/30 17:53:50 Done.
+#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.
Mark Mentovai 2013/09/26 17:09:10 bundle uses a lowercase b.
mcasas 2013/09/30 17:53:50 Done.
++ (BOOL)IsAVFoundationSupported;
Mark Mentovai 2013/09/26 17:09:10 See previous comment about naming.
mcasas 2013/09/30 17:53:50 Done. Again, IsOsLionOrLater().
+
++ (NSBundle*)getAVFoundationBundle;
Mark Mentovai 2013/09/26 17:09:10 Normal naming would just be avFoundationBundle.
mcasas 2013/09/30 17:53:50 Done.
+
+@end // @interface AVFoundationGlue
+
+// Coming from AVCaptureDevice.h
+@interface AVCaptureDeviceGlue : NSObject
+
++ (NSArray *)devices;
Mark Mentovai 2013/09/26 17:09:10 Above, you nestled the * up against the type name.
mcasas 2013/09/30 17:53:50 Done.
+
+- (BOOL)hasMediaType:(NSString *)mediaType;
+
+@end
+
+extern NSString* const AVCaptureDeviceWasConnectedNotification =
+ @"AVCaptureDeviceWasConnectedNotification";
Mark Mentovai 2013/09/26 17:09:10 You shouldn’t hard-code these 5 strings, you shoul
mcasas 2013/09/30 17:53:50 I couldn't do this because the strings are defined
+extern NSString* const AVCaptureDeviceWasDisconnectedNotification =
+ @"AVCaptureDeviceWasDisconnectedNotification";
+
+// Coming from AVMediaFormat.h
+extern NSString* const AVMediaTypeVideo = @"vide";
+extern NSString* const AVMediaTypeAudio = @"soun";
+extern NSString* const AVMediaTypeMuxed = @"muxx";
+
+#endif // MEDIA_VIDEO_CAPTURE_MAC_AVFOUNDATION_GLUE_H_

Powered by Google App Engine
This is Rietveld 408576698