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

Side by Side Diff: media/video/capture/mac/video_capture_device_mac.mm

Issue 24079003: Add VideoCaptureDevice::GetDeviceSupportedFormats to interface + implementation for Linux and Fake (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: perkj@'s nits Created 7 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "media/video/capture/mac/video_capture_device_mac.h" 5 #include "media/video/capture/mac/video_capture_device_mac.h"
6 6
7 #import <QTKit/QTKit.h> 7 #import <QTKit/QTKit.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 device_names->clear(); 64 device_names->clear();
65 65
66 NSDictionary* capture_devices = [VideoCaptureDeviceQTKit deviceNames]; 66 NSDictionary* capture_devices = [VideoCaptureDeviceQTKit deviceNames];
67 for (NSString* key in capture_devices) { 67 for (NSString* key in capture_devices) {
68 Name name([[capture_devices valueForKey:key] UTF8String], 68 Name name([[capture_devices valueForKey:key] UTF8String],
69 [key UTF8String]); 69 [key UTF8String]);
70 device_names->push_back(name); 70 device_names->push_back(name);
71 } 71 }
72 } 72 }
73 73
74 // static
75 void VideoCaptureDevice::GetDeviceSupportedFormats(const Name& device,
76 VideoCaptureCapabilities* formats) {
77 NOTIMPLEMENTED();
78 }
79
74 const std::string VideoCaptureDevice::Name::GetModel() const { 80 const std::string VideoCaptureDevice::Name::GetModel() const {
75 // Both PID and VID are 4 characters. 81 // Both PID and VID are 4 characters.
76 if (unique_id_.size() < 2 * kVidPidSize) { 82 if (unique_id_.size() < 2 * kVidPidSize) {
77 return ""; 83 return "";
78 } 84 }
79 85
80 // The last characters of device id is a concatenation of VID and then PID. 86 // The last characters of device id is a concatenation of VID and then PID.
81 const size_t vid_location = unique_id_.size() - 2 * kVidPidSize; 87 const size_t vid_location = unique_id_.size() - 2 * kVidPidSize;
82 std::string id_vendor = unique_id_.substr(vid_location, kVidPidSize); 88 std::string id_vendor = unique_id_.substr(vid_location, kVidPidSize);
83 const size_t pid_location = unique_id_.size() - kVidPidSize; 89 const size_t pid_location = unique_id_.size() - kVidPidSize;
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 if (![capture_device_ setCaptureHeight:current_settings_.height 281 if (![capture_device_ setCaptureHeight:current_settings_.height
276 width:current_settings_.width 282 width:current_settings_.width
277 frameRate:current_settings_.frame_rate]) { 283 frameRate:current_settings_.frame_rate]) {
278 ReceiveError("Could not configure capture device."); 284 ReceiveError("Could not configure capture device.");
279 return false; 285 return false;
280 } 286 }
281 return true; 287 return true;
282 } 288 }
283 289
284 } // namespace media 290 } // namespace media
OLDNEW
« no previous file with comments | « media/video/capture/linux/video_capture_device_linux.cc ('k') | media/video/capture/video_capture_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698