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

Unified Diff: services/video_capture/test/mock_device_factory.cc

Issue 2818513003: [Mojo Video Capture] Adapt video_capture service to refactored video capture stack (Closed)
Patch Set: Fix compile errors Created 3 years, 8 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 | « services/video_capture/test/fake_device_unittest.cc ('k') | services/video_capture/test/mock_device_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/video_capture/test/mock_device_factory.cc
diff --git a/services/video_capture/test/mock_device_factory.cc b/services/video_capture/test/mock_device_factory.cc
index 8fe10777a5fe125f199056825add7aad03ff3dca..dd9a7875495f1cfdadeef2ffe6a72fbaa3590b68 100644
--- a/services/video_capture/test/mock_device_factory.cc
+++ b/services/video_capture/test/mock_device_factory.cc
@@ -8,11 +8,13 @@
namespace {
// Report a single hard-coded supported format to clients.
-media::VideoCaptureFormat kSupportedFormat(gfx::Size(),
+media::VideoCaptureFormat kSupportedFormat(gfx::Size(640, 480),
25.0f,
media::PIXEL_FORMAT_I420,
media::PIXEL_STORAGE_CPU);
+// Wraps a raw pointer to a media::VideoCaptureDevice and allows us to
+// create a std::unique_ptr<media::VideoCaptureDevice> that delegates to it.
class RawPointerVideoCaptureDevice : public media::VideoCaptureDevice {
public:
explicit RawPointerVideoCaptureDevice(media::VideoCaptureDevice* device)
@@ -35,6 +37,9 @@ class RawPointerVideoCaptureDevice : public media::VideoCaptureDevice {
void TakePhoto(TakePhotoCallback callback) override {
device_->TakePhoto(std::move(callback));
}
+ void OnUtilizationReport(int frame_feedback_id, double utilization) override {
+ device_->OnUtilizationReport(frame_feedback_id, utilization);
+ }
private:
media::VideoCaptureDevice* device_;
« no previous file with comments | « services/video_capture/test/fake_device_unittest.cc ('k') | services/video_capture/test/mock_device_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698