| Index: media/capture/video/video_capture_system.h
|
| diff --git a/media/capture/video/video_capture_system.h b/media/capture/video/video_capture_system.h
|
| index f03e3a98236e5d9d47e2f2c91a0341a59da27c12..b0b6313123babdbc56bb1510348800c30ca1df0d 100644
|
| --- a/media/capture/video/video_capture_system.h
|
| +++ b/media/capture/video/video_capture_system.h
|
| @@ -10,47 +10,25 @@
|
|
|
| namespace media {
|
|
|
| -// Layer on top of VideoCaptureDeviceFactory that translates device descriptors
|
| -// to string identifiers and consolidates and caches device descriptors and
|
| -// supported formats into VideoCaptureDeviceInfos.
|
| class CAPTURE_EXPORT VideoCaptureSystem {
|
| public:
|
| using DeviceInfoCallback =
|
| base::Callback<void(const std::vector<VideoCaptureDeviceInfo>&)>;
|
|
|
| - explicit VideoCaptureSystem(
|
| - std::unique_ptr<VideoCaptureDeviceFactory> factory);
|
| - ~VideoCaptureSystem();
|
| + virtual ~VideoCaptureSystem() {}
|
|
|
| // The passed-in |result_callback| must have ownership of the called
|
| // VideoCaptureSystem instance to guarantee that it stays alive during the
|
| // asynchronous operation.
|
| - void GetDeviceInfosAsync(const DeviceInfoCallback& result_callback);
|
| + virtual void GetDeviceInfosAsync(
|
| + const DeviceInfoCallback& result_callback) = 0;
|
|
|
| // Creates a VideoCaptureDevice object. Returns nullptr if something goes
|
| // wrong.
|
| - std::unique_ptr<VideoCaptureDevice> CreateDevice(
|
| - const std::string& device_id);
|
| -
|
| - media::VideoCaptureDeviceFactory* video_capture_device_factory() const {
|
| - return factory_.get();
|
| - }
|
| -
|
| - private:
|
| - void OnDescriptorsReceived(
|
| - const DeviceInfoCallback& result_callback,
|
| - std::unique_ptr<VideoCaptureDeviceDescriptors> descriptors);
|
| -
|
| - // Returns nullptr if no descriptor found.
|
| - const VideoCaptureDeviceInfo* LookupDeviceInfoFromId(
|
| - const std::string& device_id);
|
| -
|
| - const std::unique_ptr<VideoCaptureDeviceFactory> factory_;
|
| - std::vector<VideoCaptureDeviceInfo> devices_info_cache_;
|
| -
|
| - base::ThreadChecker thread_checker_;
|
| + virtual std::unique_ptr<VideoCaptureDevice> CreateDevice(
|
| + const std::string& device_id) = 0;
|
| };
|
|
|
| } // namespace media
|
|
|
| -#endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_FACTORY_H_
|
| +#endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_SYSTEM_H_
|
|
|