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

Unified Diff: services/video_capture/mock_device_factory.cc

Issue 2486543002: [Mojo Video Capture] Add test ReceiveFramesFromFakeCaptureDevice (Closed)
Patch Set: mcasas comments mk2 Created 4 years, 1 month 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: services/video_capture/mock_device_factory.cc
diff --git a/services/video_capture/mock_device_factory.cc b/services/video_capture/mock_device_factory.cc
index b1157a4211ddeda5f0bd944ddc12f2669f38f9ba..a32497db5efa82f101a3f1ab0c9ba4eaa9863b40 100644
--- a/services/video_capture/mock_device_factory.cc
+++ b/services/video_capture/mock_device_factory.cc
@@ -11,6 +11,14 @@
#include "media/capture/video/fake_video_capture_device.h"
#include "services/video_capture/device_mock_to_media_adapter.h"
+namespace {
+// Report a single hard-coded supported format to clients.
+media::VideoCaptureFormat kSupportedFormat(gfx::Size(),
+ 25.0f,
+ media::PIXEL_FORMAT_I420,
+ media::PIXEL_STORAGE_CPU);
+}
+
namespace video_capture {
MockDeviceFactory::MockDeviceFactory() = default;
@@ -41,7 +49,7 @@ void MockDeviceFactory::GetDeviceDescriptors(
void MockDeviceFactory::GetSupportedFormats(
const media::VideoCaptureDeviceDescriptor& device_descriptor,
media::VideoCaptureFormats* supported_formats) {
- NOTIMPLEMENTED();
+ supported_formats->push_back(kSupportedFormat);
}
} // namespace video_capture
« no previous file with comments | « services/video_capture/mock_device_descriptor_receiver.h ('k') | services/video_capture/public/cpp/video_capture_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698