OLD | NEW |
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_FACTORY_MEDIA_TO_MOJO_ADAPTER_H_ | 5 #ifndef SERVICES_VIDEO_CAPTURE_DEVICE_FACTORY_MEDIA_TO_MOJO_ADAPTER_H_ |
6 #define SERVICES_VIDEO_CAPTURE_DEVICE_FACTORY_MEDIA_TO_MOJO_ADAPTER_H_ | 6 #define SERVICES_VIDEO_CAPTURE_DEVICE_FACTORY_MEDIA_TO_MOJO_ADAPTER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "media/capture/video/video_capture_device_client.h" | 10 #include "media/capture/video/video_capture_device_client.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 // media::VideoCaptureDevice at the same time. | 23 // media::VideoCaptureDevice at the same time. |
24 class DeviceFactoryMediaToMojoAdapter : public mojom::DeviceFactory { | 24 class DeviceFactoryMediaToMojoAdapter : public mojom::DeviceFactory { |
25 public: | 25 public: |
26 DeviceFactoryMediaToMojoAdapter( | 26 DeviceFactoryMediaToMojoAdapter( |
27 std::unique_ptr<media::VideoCaptureDeviceFactory> device_factory, | 27 std::unique_ptr<media::VideoCaptureDeviceFactory> device_factory, |
28 const media::VideoCaptureJpegDecoderFactoryCB& | 28 const media::VideoCaptureJpegDecoderFactoryCB& |
29 jpeg_decoder_factory_callback); | 29 jpeg_decoder_factory_callback); |
30 ~DeviceFactoryMediaToMojoAdapter() override; | 30 ~DeviceFactoryMediaToMojoAdapter() override; |
31 | 31 |
32 // mojom::DeviceFactory: | 32 // mojom::DeviceFactory: |
33 void EnumerateDeviceDescriptors( | 33 void GetDeviceInfos(const GetDeviceInfosCallback& callback) override; |
34 const EnumerateDeviceDescriptorsCallback& callback) override; | |
35 void GetSupportedFormats( | |
36 const std::string& device_id, | |
37 const GetSupportedFormatsCallback& callback) override; | |
38 void CreateDevice(const std::string& device_id, | 34 void CreateDevice(const std::string& device_id, |
39 mojom::DeviceRequest device_request, | 35 mojom::DeviceRequest device_request, |
40 const CreateDeviceCallback& callback) override; | 36 const CreateDeviceCallback& callback) override; |
41 | 37 |
42 private: | 38 private: |
43 struct ActiveDeviceEntry { | 39 struct ActiveDeviceEntry { |
44 ActiveDeviceEntry(); | 40 ActiveDeviceEntry(); |
45 ~ActiveDeviceEntry(); | 41 ~ActiveDeviceEntry(); |
46 ActiveDeviceEntry(ActiveDeviceEntry&& other); | 42 ActiveDeviceEntry(ActiveDeviceEntry&& other); |
47 ActiveDeviceEntry& operator=(ActiveDeviceEntry&& other); | 43 ActiveDeviceEntry& operator=(ActiveDeviceEntry&& other); |
(...skipping 12 matching lines...) Expand all Loading... |
60 media::VideoCaptureDeviceDescriptor* descriptor); | 56 media::VideoCaptureDeviceDescriptor* descriptor); |
61 | 57 |
62 const std::unique_ptr<media::VideoCaptureDeviceFactory> device_factory_; | 58 const std::unique_ptr<media::VideoCaptureDeviceFactory> device_factory_; |
63 const media::VideoCaptureJpegDecoderFactoryCB jpeg_decoder_factory_callback_; | 59 const media::VideoCaptureJpegDecoderFactoryCB jpeg_decoder_factory_callback_; |
64 std::map<std::string, ActiveDeviceEntry> active_devices_by_id_; | 60 std::map<std::string, ActiveDeviceEntry> active_devices_by_id_; |
65 }; | 61 }; |
66 | 62 |
67 } // namespace video_capture | 63 } // namespace video_capture |
68 | 64 |
69 #endif // SERVICES_VIDEO_CAPTURE_DEVICE_FACTORY_MEDIA_TO_MOJO_ADAPTER_H_ | 65 #endif // SERVICES_VIDEO_CAPTURE_DEVICE_FACTORY_MEDIA_TO_MOJO_ADAPTER_H_ |
OLD | NEW |