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

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

Issue 2169013002: Change class VideoCaptureDevice::Name to struct VideoCaptureDeviceDescriptor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactoring of VideoCaptureDeviceFactory interface Created 4 years, 5 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "media/capture/video/video_capture_device_descriptor.h"
6
7 #include "base/logging.h"
8
9 namespace media {
10
11 VideoCaptureDeviceDescriptor::VideoCaptureDeviceDescriptor()
12 : capture_api(VideoCaptureApiType::API_TYPE_UNKNOWN),
13 transport_type(VideoCaptureTransportType::OTHER_TRANSPORT) {}
14
15 VideoCaptureDeviceDescriptor::~VideoCaptureDeviceDescriptor() {}
16
17 VideoCaptureDeviceDescriptor::VideoCaptureDeviceDescriptor(
18 const VideoCaptureDeviceDescriptor& other) = default;
19
20 const char* VideoCaptureDeviceDescriptor::GetCaptureApiTypeString() const {
21 switch (capture_api) {
22 case VideoCaptureApiType::LINUX_V4L2_SINGLE_PLANE:
23 return "V4L2 SPLANE";
24 case VideoCaptureApiType::WINDOWS_MEDIA_FOUNDATION:
25 return "Media Foundation";
26 case VideoCaptureApiType::WINDOWS_DIRECT_SHOW:
27 return "Direct Show";
28 case VideoCaptureApiType::MACOSX_AVFOUNDATION:
29 return "AV Foundation";
30 case VideoCaptureApiType::MACOSX_DECKLINK:
31 return "DeckLink";
32 case VideoCaptureApiType::ANDROID_API1:
33 return "Camera API1";
34 case VideoCaptureApiType::ANDROID_API2_LEGACY:
35 return "Camera API2 Legacy";
36 case VideoCaptureApiType::ANDROID_API2_FULL:
37 return "Camera API2 Full";
38 case VideoCaptureApiType::ANDROID_API2_LIMITED:
39 return "Camera API2 Limited";
40 case VideoCaptureApiType::ANDROID_TANGO:
41 return "Tango API";
42 default:
43 NOTREACHED() << "Unknown Video Capture API type: "
44 << static_cast<int>(capture_api);
45 return "Unknown API";
46 }
47 }
48
49 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698