| Index: media/capture/video/video_capture_device_descriptor.cc
|
| diff --git a/media/capture/video/video_capture_device_descriptor.cc b/media/capture/video/video_capture_device_descriptor.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a3c0eacf880489712cade15d198a222adfe568f2
|
| --- /dev/null
|
| +++ b/media/capture/video/video_capture_device_descriptor.cc
|
| @@ -0,0 +1,49 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "media/capture/video/video_capture_device_descriptor.h"
|
| +
|
| +#include "base/logging.h"
|
| +
|
| +namespace media {
|
| +
|
| +VideoCaptureDeviceDescriptor::VideoCaptureDeviceDescriptor()
|
| + : capture_api(VideoCaptureApiType::API_TYPE_UNKNOWN),
|
| + transport_type(VideoCaptureTransportType::OTHER_TRANSPORT) {}
|
| +
|
| +VideoCaptureDeviceDescriptor::~VideoCaptureDeviceDescriptor() {}
|
| +
|
| +VideoCaptureDeviceDescriptor::VideoCaptureDeviceDescriptor(
|
| + const VideoCaptureDeviceDescriptor& other) = default;
|
| +
|
| +const char* VideoCaptureDeviceDescriptor::GetCaptureApiTypeString() const {
|
| + switch (capture_api) {
|
| + case VideoCaptureApiType::LINUX_V4L2_SINGLE_PLANE:
|
| + return "V4L2 SPLANE";
|
| + case VideoCaptureApiType::WINDOWS_MEDIA_FOUNDATION:
|
| + return "Media Foundation";
|
| + case VideoCaptureApiType::WINDOWS_DIRECT_SHOW:
|
| + return "Direct Show";
|
| + case VideoCaptureApiType::MACOSX_AVFOUNDATION:
|
| + return "AV Foundation";
|
| + case VideoCaptureApiType::MACOSX_DECKLINK:
|
| + return "DeckLink";
|
| + case VideoCaptureApiType::ANDROID_API1:
|
| + return "Camera API1";
|
| + case VideoCaptureApiType::ANDROID_API2_LEGACY:
|
| + return "Camera API2 Legacy";
|
| + case VideoCaptureApiType::ANDROID_API2_FULL:
|
| + return "Camera API2 Full";
|
| + case VideoCaptureApiType::ANDROID_API2_LIMITED:
|
| + return "Camera API2 Limited";
|
| + case VideoCaptureApiType::ANDROID_TANGO:
|
| + return "Tango API";
|
| + default:
|
| + NOTREACHED() << "Unknown Video Capture API type: "
|
| + << static_cast<int>(capture_api);
|
| + return "Unknown API";
|
| + }
|
| +}
|
| +
|
| +} // namespace media
|
|
|