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

Side by Side Diff: services/video_capture/public/cpp/device_to_feedback_observer_adapter.h

Issue 2824883005: [Mojo Video Capture] Stop service when last client disconnects. (Closed)
Patch Set: Incorporate suggestions from PatchSet 1 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef SERVICES_VIDEO_CAPTURE_PUBLIC_CPP_DEVICE_TO_FEEDBACK_OBSERVER_ADAPTER_H_ 5 #ifndef SERVICES_VIDEO_CAPTURE_PUBLIC_CPP_DEVICE_TO_FEEDBACK_OBSERVER_ADAPTER_H_
6 #define SERVICES_VIDEO_CAPTURE_PUBLIC_CPP_DEVICE_TO_FEEDBACK_OBSERVER_ADAPTER_H_ 6 #define SERVICES_VIDEO_CAPTURE_PUBLIC_CPP_DEVICE_TO_FEEDBACK_OBSERVER_ADAPTER_H_
7 7
8 #include "media/capture/video/video_capture_device.h" 8 #include "media/capture/video/video_capture_device.h"
9 #include "services/video_capture/public/interfaces/device.mojom.h" 9 #include "services/video_capture/public/interfaces/device.mojom.h"
10 10
11 namespace video_capture { 11 namespace video_capture {
12 12
13 // Adapter that allows a video_capture::mojom::Device to be used in place of 13 // Adapter that allows a video_capture::mojom::Device to be used in place of
14 // a media::VideoFrameConsumerFeedbackObserver 14 // a media::VideoFrameConsumerFeedbackObserver
15 class DeviceToFeedbackObserverAdapter 15 class DeviceToFeedbackObserverAdapter
16 : public media::VideoFrameConsumerFeedbackObserver { 16 : public media::VideoFrameConsumerFeedbackObserver {
17 public: 17 public:
18 DeviceToFeedbackObserverAdapter(mojom::DevicePtr device); 18 DeviceToFeedbackObserverAdapter(mojom::DevicePtr* device);
19 ~DeviceToFeedbackObserverAdapter() override; 19 ~DeviceToFeedbackObserverAdapter() override;
20 20
21 // media::VideoFrameConsumerFeedbackObserver: 21 // media::VideoFrameConsumerFeedbackObserver:
22 void OnUtilizationReport(int frame_feedback_id, double utilization) override; 22 void OnUtilizationReport(int frame_feedback_id, double utilization) override;
23 23
24 private: 24 private:
25 mojom::DevicePtr device_; 25 mojom::DevicePtr* device_;
mcasas 2017/04/27 00:22:15 I'm surprised by this change, it seems unrelated t
chfremer 2017/04/27 19:52:49 Thanks for catching this. You are right, this chan
26 }; 26 };
27 27
28 } // namespace video_capture 28 } // namespace video_capture
29 29
30 #endif // SERVICES_VIDEO_CAPTURE_PUBLIC_CPP_DEVICE_TO_FEEDBACK_OBSERVER_ADAPTER _H_ 30 #endif // SERVICES_VIDEO_CAPTURE_PUBLIC_CPP_DEVICE_TO_FEEDBACK_OBSERVER_ADAPTER _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698