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

Unified Diff: media/capture/video/linux/v4l2_capture_delegate.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
Index: media/capture/video/linux/v4l2_capture_delegate.cc
diff --git a/media/capture/video/linux/v4l2_capture_delegate.cc b/media/capture/video/linux/v4l2_capture_delegate.cc
index d0a9cb1a565f0e8d07738dd2c634b46d02b536a4..a6f47b551ed410f3fa28c5f45b888eee6f97c0b7 100644
--- a/media/capture/video/linux/v4l2_capture_delegate.cc
+++ b/media/capture/video/linux/v4l2_capture_delegate.cc
@@ -157,11 +157,11 @@ std::list<uint32_t> V4L2CaptureDelegate::GetListOfUsableFourCcs(
}
V4L2CaptureDelegate::V4L2CaptureDelegate(
- const VideoCaptureDevice::Name& device_name,
+ const VideoCaptureDeviceDescriptor& device_descriptor,
const scoped_refptr<base::SingleThreadTaskRunner>& v4l2_task_runner,
int power_line_frequency)
: v4l2_task_runner_(v4l2_task_runner),
- device_name_(device_name),
+ device_descriptor_(device_descriptor),
power_line_frequency_(power_line_frequency),
is_capturing_(false),
timeout_count_(0),
@@ -177,7 +177,8 @@ void V4L2CaptureDelegate::AllocateAndStart(
client_ = std::move(client);
// Need to open camera with O_RDWR after Linux kernel 3.3.
- device_fd_.reset(HANDLE_EINTR(open(device_name_.id().c_str(), O_RDWR)));
+ device_fd_.reset(
+ HANDLE_EINTR(open(device_descriptor_.device_id.c_str(), O_RDWR)));
if (!device_fd_.is_valid()) {
SetErrorState(FROM_HERE, "Failed to open V4L2 device driver file.");
return;
« no previous file with comments | « media/capture/video/linux/v4l2_capture_delegate.h ('k') | media/capture/video/linux/video_capture_device_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698