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

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

Issue 366593003: Mac VideoCapture: return empty GetModel() for non-USB non-built-in cameras. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/video_capture_device_mac.h
diff --git a/media/video/capture/mac/video_capture_device_mac.h b/media/video/capture/mac/video_capture_device_mac.h
index 36dc015e373f6f87a932febc669e14afff47599c..60da1396d5f28575459fb40da90e818fd5b2d17f 100644
--- a/media/video/capture/mac/video_capture_device_mac.h
+++ b/media/video/capture/mac/video_capture_device_mac.h
@@ -10,9 +10,12 @@
#ifndef MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_
#define MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_
+#import <Foundation/Foundation.h>
+
#include <string>
#include "base/compiler_specific.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "media/video/capture/video_capture_device.h"
@@ -24,8 +27,30 @@ namespace base {
class SingleThreadTaskRunner;
}
+// Small class to bundle device name and connection type into a dictionary.
+MEDIA_EXPORT
+@interface DeviceNameAndTransportType : NSObject {
+ @private
+ base::scoped_nsobject<NSString> deviceName_;
+ // The transport type of the device (USB, PCI, etc), values are defined in
+ // <IOKit/audio/IOAudioTypes.h> as kIOAudioDeviceTransportType*.
+ int32_t transportType_;
+}
+
+- (id)initWithName:(NSString*)name transportType:(int32_t)transportType;
+
+- (NSString*)deviceName;
+- (int32_t)transportType;
+@end
+
namespace media {
+enum {
+ // Unknown transport type, addition to the kIOAudioDeviceTransportType*
+ // family for QTKit devices where this attribute isn't published.
+ kIOAudioDeviceTransportTypeUnknown = 'unkn'
+};
+
// Called by VideoCaptureManager to open, close and start, stop Mac video
// capture devices.
class VideoCaptureDeviceMac : public VideoCaptureDevice {

Powered by Google App Engine
This is Rietveld 408576698