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

Side by Side Diff: services/video_capture/device_media_to_mojo_adapter.h

Issue 2813343002: [Mojo Video Capture] Switch to using Mojo structs in media/capture/mojo (Closed)
Patch Set: Removed extraneous AtLeast 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_DEVICE_MEDIA_TO_MOJO_ADAPTER_H_ 5 #ifndef SERVICES_VIDEO_CAPTURE_DEVICE_MEDIA_TO_MOJO_ADAPTER_H_
6 #define SERVICES_VIDEO_CAPTURE_DEVICE_MEDIA_TO_MOJO_ADAPTER_H_ 6 #define SERVICES_VIDEO_CAPTURE_DEVICE_MEDIA_TO_MOJO_ADAPTER_H_
7 7
8 #include "media/capture/video/video_capture_device.h" 8 #include "media/capture/video/video_capture_device.h"
9 #include "media/capture/video/video_capture_device_client.h" 9 #include "media/capture/video/video_capture_device_client.h"
10 #include "media/capture/video_capture_types.h" 10 #include "media/capture/video_capture_types.h"
11 #include "services/video_capture/public/interfaces/device.mojom.h" 11 #include "services/video_capture/public/interfaces/device.mojom.h"
12 12
13 namespace video_capture { 13 namespace video_capture {
14 14
15 // Implementation of mojom::Device backed by a given instance of 15 // Implementation of mojom::Device backed by a given instance of
16 // media::VideoCaptureDevice. 16 // media::VideoCaptureDevice.
17 class DeviceMediaToMojoAdapter : public mojom::Device { 17 class DeviceMediaToMojoAdapter : public mojom::Device {
18 public: 18 public:
19 DeviceMediaToMojoAdapter(std::unique_ptr<media::VideoCaptureDevice> device, 19 DeviceMediaToMojoAdapter(std::unique_ptr<media::VideoCaptureDevice> device,
20 const media::VideoCaptureJpegDecoderFactoryCB& 20 const media::VideoCaptureJpegDecoderFactoryCB&
21 jpeg_decoder_factory_callback); 21 jpeg_decoder_factory_callback);
22 ~DeviceMediaToMojoAdapter() override; 22 ~DeviceMediaToMojoAdapter() override;
23 23
24 // mojom::Device: 24 // mojom::Device:
25 void Start(const CaptureSettings& requested_settings, 25 void Start(const media::VideoCaptureParams& requested_settings,
26 mojom::ReceiverPtr receiver) override; 26 mojom::ReceiverPtr receiver) override;
27 27
28 void Stop(); 28 void Stop();
29 29
30 void OnClientConnectionErrorOrClose(); 30 void OnClientConnectionErrorOrClose();
31 31
32 private: 32 private:
33 const std::unique_ptr<media::VideoCaptureDevice> device_; 33 const std::unique_ptr<media::VideoCaptureDevice> device_;
34 media::VideoCaptureJpegDecoderFactoryCB jpeg_decoder_factory_callback_; 34 media::VideoCaptureJpegDecoderFactoryCB jpeg_decoder_factory_callback_;
35 bool device_running_; 35 bool device_running_;
36 }; 36 };
37 37
38 } // namespace video_capture 38 } // namespace video_capture
39 39
40 #endif // SERVICES_VIDEO_CAPTURE_DEVICE_MEDIA_TO_MOJO_ADAPTER_H_ 40 #endif // SERVICES_VIDEO_CAPTURE_DEVICE_MEDIA_TO_MOJO_ADAPTER_H_
OLDNEW
« no previous file with comments | « services/video_capture/device_factory_media_to_mojo_adapter.cc ('k') | services/video_capture/device_media_to_mojo_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698