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

Unified Diff: services/video_capture/public/cpp/device_to_feedback_observer_adapter.h

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
Index: services/video_capture/public/cpp/device_to_feedback_observer_adapter.h
diff --git a/services/video_capture/public/cpp/device_to_feedback_observer_adapter.h b/services/video_capture/public/cpp/device_to_feedback_observer_adapter.h
new file mode 100644
index 0000000000000000000000000000000000000000..b35dab01d1701511cb2982cfd3f100a004cc5625
--- /dev/null
+++ b/services/video_capture/public/cpp/device_to_feedback_observer_adapter.h
@@ -0,0 +1,30 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SERVICES_VIDEO_CAPTURE_PUBLIC_CPP_DEVICE_TO_FEEDBACK_OBSERVER_ADAPTER_H_
+#define SERVICES_VIDEO_CAPTURE_PUBLIC_CPP_DEVICE_TO_FEEDBACK_OBSERVER_ADAPTER_H_
+
+#include "media/capture/video/video_capture_device.h"
+#include "services/video_capture/public/interfaces/device.mojom.h"
+
+namespace video_capture {
+
+// Adapter that allows a video_capture::mojom::Device to be used in place of
+// a media::VideoFrameConsumerFeedbackObserver
+class DeviceToFeedbackObserverAdapter
+ : public media::VideoFrameConsumerFeedbackObserver {
+ public:
+ DeviceToFeedbackObserverAdapter(mojom::DevicePtr device);
+ ~DeviceToFeedbackObserverAdapter() override;
+
+ // media::VideoFrameConsumerFeedbackObserver:
+ void OnUtilizationReport(int frame_feedback_id, double utilization) override;
+
+ private:
+ mojom::DevicePtr device_;
+};
+
+} // namespace video_capture
+
+#endif // SERVICES_VIDEO_CAPTURE_PUBLIC_CPP_DEVICE_TO_FEEDBACK_OBSERVER_ADAPTER_H_

Powered by Google App Engine
This is Rietveld 408576698