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

Side by Side Diff: media/capture/video/video_capture_device_factory.cc

Issue 2169013002: Change class VideoCaptureDevice::Name to struct VideoCaptureDeviceDescriptor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build errors Created 4 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/capture/video/video_capture_device_factory.h" 5 #include "media/capture/video/video_capture_device_factory.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 24 matching lines...) Expand all
35 // screen rotations. 35 // screen rotations.
36 return std::unique_ptr<VideoCaptureDeviceFactory>( 36 return std::unique_ptr<VideoCaptureDeviceFactory>(
37 CreateVideoCaptureDeviceFactory(ui_task_runner)); 37 CreateVideoCaptureDeviceFactory(ui_task_runner));
38 } 38 }
39 } 39 }
40 40
41 VideoCaptureDeviceFactory::VideoCaptureDeviceFactory() { 41 VideoCaptureDeviceFactory::VideoCaptureDeviceFactory() {
42 thread_checker_.DetachFromThread(); 42 thread_checker_.DetachFromThread();
43 } 43 }
44 44
45 VideoCaptureDeviceFactory::~VideoCaptureDeviceFactory() { 45 VideoCaptureDeviceFactory::~VideoCaptureDeviceFactory() {}
46 }
47 46
48 void VideoCaptureDeviceFactory::EnumerateDeviceNames( 47 void VideoCaptureDeviceFactory::EnumerateDeviceDescriptors(
49 const base::Callback< 48 const base::Callback<void(std::unique_ptr<VideoCaptureDeviceDescriptors>)>&
50 void(std::unique_ptr<media::VideoCaptureDevice::Names>)>& callback) { 49 callback) {
51 DCHECK(thread_checker_.CalledOnValidThread()); 50 DCHECK(thread_checker_.CalledOnValidThread());
52 DCHECK(!callback.is_null()); 51 DCHECK(!callback.is_null());
53 std::unique_ptr<VideoCaptureDevice::Names> device_names( 52 std::unique_ptr<VideoCaptureDeviceDescriptors> device_descriptors(
54 new VideoCaptureDevice::Names()); 53 new VideoCaptureDeviceDescriptors());
55 GetDeviceNames(device_names.get()); 54 GetDeviceDescriptors(device_descriptors.get());
56 callback.Run(std::move(device_names)); 55 callback.Run(std::move(device_descriptors));
57 } 56 }
58 57
59 #if !defined(OS_MACOSX) && !defined(OS_LINUX) && !defined(OS_ANDROID) && \ 58 #if !defined(OS_MACOSX) && !defined(OS_LINUX) && !defined(OS_ANDROID) && \
60 !defined(OS_WIN) 59 !defined(OS_WIN)
61 // static 60 // static
62 VideoCaptureDeviceFactory* 61 VideoCaptureDeviceFactory*
63 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory( 62 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory(
64 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { 63 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
65 NOTIMPLEMENTED(); 64 NOTIMPLEMENTED();
66 return NULL; 65 return NULL;
67 } 66 }
68 #endif 67 #endif
69 68
70 } // namespace media 69 } // namespace media
OLDNEW
« no previous file with comments | « media/capture/video/video_capture_device_factory.h ('k') | media/capture/video/video_capture_device_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698