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

Unified Diff: media/capture/video/video_capture_device.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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/capture/video/video_capture_device.h ('k') | media/capture/video/video_capture_device_descriptor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/capture/video/video_capture_device.cc
diff --git a/media/capture/video/video_capture_device.cc b/media/capture/video/video_capture_device.cc
index 13a6faf62c76612013c8f5513ea5056d3d5dcdd3..5da33f01b7c39fcde86833e000fc04a04bbfd3da 100644
--- a/media/capture/video/video_capture_device.cc
+++ b/media/capture/video/video_capture_device.cc
@@ -13,128 +13,6 @@
namespace media {
-// TODO(msu.koo): http://crbug.com/532272, remove checking the switch in favour
-// of deferring GetModel() call to the actual VideoCaptureDevice object.
-const std::string VideoCaptureDevice::Name::GetNameAndModel() const {
- const std::string model_id = GetModel();
- if (model_id.empty())
- return device_name_;
- const std::string suffix = " (" + model_id + ")";
- if (base::EndsWith(device_name_, suffix, base::CompareCase::SENSITIVE) ||
- base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kUseFakeDeviceForMediaStream))
- // Ignore |model_id| if |kUseFakeDeviceForMediaStream| flag is present.
- return device_name_;
- return device_name_ + suffix;
-}
-
-VideoCaptureDevice::Name::Name() {
-}
-
-VideoCaptureDevice::Name::Name(const std::string& name, const std::string& id)
- : device_name_(name), unique_id_(id) {
-}
-
-#if defined(OS_LINUX)
-VideoCaptureDevice::Name::Name(const std::string& name,
- const std::string& id,
- const CaptureApiType api_type)
- : device_name_(name), unique_id_(id), capture_api_class_(api_type) {
-}
-#elif defined(OS_WIN)
-VideoCaptureDevice::Name::Name(const std::string& name,
- const std::string& id,
- const CaptureApiType api_type)
- : device_name_(name),
- unique_id_(id),
- capture_api_class_(api_type),
- capabilities_id_(id) {
-}
-#elif defined(OS_MACOSX)
-VideoCaptureDevice::Name::Name(const std::string& name,
- const std::string& id,
- const CaptureApiType api_type)
- : device_name_(name),
- unique_id_(id),
- capture_api_class_(api_type),
- transport_type_(OTHER_TRANSPORT) {}
-
-VideoCaptureDevice::Name::Name(const std::string& name,
- const std::string& id,
- const CaptureApiType api_type,
- const TransportType transport_type)
- : device_name_(name),
- unique_id_(id),
- capture_api_class_(api_type),
- transport_type_(transport_type) {}
-#elif defined(ANDROID)
-VideoCaptureDevice::Name::Name(const std::string& name,
- const std::string& id,
- const CaptureApiType api_type)
- : device_name_(name), unique_id_(id), capture_api_class_(api_type) {
-}
-#endif
-
-VideoCaptureDevice::Name::Name(const Name& other) = default;
-
-VideoCaptureDevice::Name::~Name() {
-}
-
-#if defined(OS_LINUX)
-const char* VideoCaptureDevice::Name::GetCaptureApiTypeString() const {
- switch (capture_api_type()) {
- case V4L2_SINGLE_PLANE:
- return "V4L2 SPLANE";
- default:
- NOTREACHED() << "Unknown Video Capture API type!";
- return "Unknown API";
- }
-}
-#elif defined(OS_WIN)
-const char* VideoCaptureDevice::Name::GetCaptureApiTypeString() const {
- switch (capture_api_type()) {
- case MEDIA_FOUNDATION:
- return "Media Foundation";
- case DIRECT_SHOW:
- return "Direct Show";
- default:
- NOTREACHED() << "Unknown Video Capture API type!";
- return "Unknown API";
- }
-}
-#elif defined(OS_MACOSX)
-const char* VideoCaptureDevice::Name::GetCaptureApiTypeString() const {
- switch (capture_api_type()) {
- case AVFOUNDATION:
- return "AV Foundation";
- case DECKLINK:
- return "DeckLink";
- default:
- NOTREACHED() << "Unknown Video Capture API type!";
- return "Unknown API";
- }
-}
-#elif defined(OS_ANDROID)
-const char* VideoCaptureDevice::Name::GetCaptureApiTypeString() const {
- switch (capture_api_type()) {
- case API1:
- return "Camera API1";
- case API2_LEGACY:
- return "Camera API2 Legacy";
- case API2_FULL:
- return "Camera API2 Full";
- case API2_LIMITED:
- return "Camera API2 Limited";
- case TANGO:
- return "Tango API";
- case API_TYPE_UNKNOWN:
- default:
- NOTREACHED() << "Unknown Video Capture API type!";
- return "Unknown API";
- }
-}
-#endif
-
VideoCaptureDevice::Client::Buffer::~Buffer() {
}
« no previous file with comments | « media/capture/video/video_capture_device.h ('k') | media/capture/video/video_capture_device_descriptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698