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

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

Issue 967793002: Linux Video Capture: Add V4L2VideoCaptureDelegate{Single,Multi}Plane. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 video_capture_device_factory_->GetDeviceSupportedFormats( 172 video_capture_device_factory_->GetDeviceSupportedFormats(
173 names_iterator, 173 names_iterator,
174 &supported_formats); 174 &supported_formats);
175 for (const auto& formats_iterator : supported_formats) { 175 for (const auto& formats_iterator : supported_formats) {
176 if (formats_iterator.pixel_format == pixel_format) { 176 if (formats_iterator.pixel_format == pixel_format) {
177 return scoped_ptr<VideoCaptureDevice::Name>( 177 return scoped_ptr<VideoCaptureDevice::Name>(
178 new VideoCaptureDevice::Name(names_iterator)); 178 new VideoCaptureDevice::Name(names_iterator));
179 } 179 }
180 } 180 }
181 } 181 }
182 DVLOG(1) << "No camera can capture the format: " << pixel_format; 182 DVLOG_IF(1, pixel_format != PIXEL_FORMAT_MAX) << "No camera can capture the"
183 << " format: " << VideoCaptureFormat::PixelFormatToString(pixel_format);
183 return scoped_ptr<VideoCaptureDevice::Name>(); 184 return scoped_ptr<VideoCaptureDevice::Name>();
184 } 185 }
185 186
186 #if defined(OS_WIN) 187 #if defined(OS_WIN)
187 base::win::ScopedCOMInitializer initialize_com_; 188 base::win::ScopedCOMInitializer initialize_com_;
188 #endif 189 #endif
189 scoped_ptr<VideoCaptureDevice::Names> names_; 190 scoped_ptr<VideoCaptureDevice::Names> names_;
190 scoped_ptr<base::MessageLoop> loop_; 191 scoped_ptr<base::MessageLoop> loop_;
191 scoped_ptr<base::RunLoop> run_loop_; 192 scoped_ptr<base::RunLoop> run_loop_;
192 scoped_ptr<MockClient> client_; 193 scoped_ptr<MockClient> client_;
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 // Use PIXEL_FORMAT_MAX to iterate all device names for testing 429 // Use PIXEL_FORMAT_MAX to iterate all device names for testing
429 // GetDeviceSupportedFormats(). 430 // GetDeviceSupportedFormats().
430 scoped_ptr<VideoCaptureDevice::Name> name = 431 scoped_ptr<VideoCaptureDevice::Name> name =
431 GetFirstDeviceNameSupportingPixelFormat(PIXEL_FORMAT_MAX); 432 GetFirstDeviceNameSupportingPixelFormat(PIXEL_FORMAT_MAX);
432 // Verify no camera returned for PIXEL_FORMAT_MAX. Nothing else to test here 433 // Verify no camera returned for PIXEL_FORMAT_MAX. Nothing else to test here
433 // since we cannot forecast the hardware capabilities. 434 // since we cannot forecast the hardware capabilities.
434 ASSERT_FALSE(name); 435 ASSERT_FALSE(name);
435 } 436 }
436 437
437 }; // namespace media 438 }; // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698