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

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

Issue 311343004: VideoCaptureDevice: remove emtpy static methods that are now implemented in the VCDFactory. (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 unified diff | Download patch | Annotate | Revision Log
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 #include <IOKit/IOCFPlugIn.h> 7 #include <IOKit/IOCFPlugIn.h>
8 #include <IOKit/usb/IOUSBLib.h> 8 #include <IOKit/usb/IOUSBLib.h>
9 #include <IOKit/usb/USBSpec.h> 9 #include <IOKit/usb/USBSpec.h>
10 10
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 &video_control_interface)) { 299 &video_control_interface)) {
300 return; 300 return;
301 } 301 }
302 base::mac::ScopedIOPluginInterface<IOCFPlugInInterface> 302 base::mac::ScopedIOPluginInterface<IOCFPlugInInterface>
303 plugin_interface_ref(video_control_interface); 303 plugin_interface_ref(video_control_interface);
304 304
305 SetAntiFlickerInVideoControlInterface(video_control_interface, frequency); 305 SetAntiFlickerInVideoControlInterface(video_control_interface, frequency);
306 } 306 }
307 } 307 }
308 308
309 // TODO(mcasas): Remove the following static methods when they are no longer
310 // referenced from VideoCaptureDeviceFactory, i.e. when all OS platforms have
311 // splitted the VideoCaptureDevice into VideoCaptureDevice and
312 // VideoCaptureDeviceFactory.
313
314 // static
315 VideoCaptureDevice* VideoCaptureDevice::Create(
316 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
317 const Name& device_name) {
318 NOTREACHED();
319 return NULL;
320 }
321 // static
322 void VideoCaptureDevice::GetDeviceNames(Names* device_names) {
323 NOTREACHED();
324 }
325
326 // static
327 void VideoCaptureDevice::GetDeviceSupportedFormats(
328 const Name& device,
329 VideoCaptureFormats* supported_formats) {
330 NOTREACHED();
331 }
332
333 const std::string VideoCaptureDevice::Name::GetModel() const { 309 const std::string VideoCaptureDevice::Name::GetModel() const {
334 // Both PID and VID are 4 characters. 310 // Both PID and VID are 4 characters.
335 if (unique_id_.size() < 2 * kVidPidSize) { 311 if (unique_id_.size() < 2 * kVidPidSize) {
336 return ""; 312 return "";
337 } 313 }
338 314
339 // The last characters of device id is a concatenation of VID and then PID. 315 // The last characters of device id is a concatenation of VID and then PID.
340 const size_t vid_location = unique_id_.size() - 2 * kVidPidSize; 316 const size_t vid_location = unique_id_.size() - 2 * kVidPidSize;
341 std::string id_vendor = unique_id_.substr(vid_location, kVidPidSize); 317 std::string id_vendor = unique_id_.substr(vid_location, kVidPidSize);
342 const size_t pid_location = unique_id_.size() - kVidPidSize; 318 const size_t pid_location = unique_id_.size() - kVidPidSize;
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 if (![capture_device_ setCaptureHeight:capture_format_.frame_size.height() 550 if (![capture_device_ setCaptureHeight:capture_format_.frame_size.height()
575 width:capture_format_.frame_size.width() 551 width:capture_format_.frame_size.width()
576 frameRate:capture_format_.frame_rate]) { 552 frameRate:capture_format_.frame_rate]) {
577 ReceiveError("Could not configure capture device."); 553 ReceiveError("Could not configure capture device.");
578 return false; 554 return false;
579 } 555 }
580 return true; 556 return true;
581 } 557 }
582 558
583 } // namespace media 559 } // namespace media
OLDNEW
« no previous file with comments | « media/video/capture/linux/video_capture_device_linux.cc ('k') | media/video/capture/win/video_capture_device_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698