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

Side by Side Diff: media/capture/video/video_capture_system.h

Issue 2867213004: [Mojo Video Capture] Hook up video capture service behind a feature flag (Closed)
Patch Set: Rebase to May 19th Created 3 years, 7 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_SYSTEM_H_ 5 #ifndef MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_SYSTEM_H_
6 #define MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_SYSTEM_H_ 6 #define MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_SYSTEM_H_
7 7
8 #include "media/capture/video/video_capture_device_factory.h" 8 #include "media/capture/video/video_capture_device_factory.h"
9 #include "media/capture/video/video_capture_device_info.h" 9 #include "media/capture/video/video_capture_device_info.h"
10 10
11 namespace media { 11 namespace media {
12 12
13 // GetDeviceInfosAsync() should be called at least once before calling 13 // GetDeviceInfosAsync() should be called at least once before calling
14 // CreateDevice(), because otherwise CreateDevice() will allways return nullptr. 14 // CreateDevice(), because otherwise CreateDevice() will allways return nullptr.
15 class CAPTURE_EXPORT VideoCaptureSystem { 15 class CAPTURE_EXPORT VideoCaptureSystem {
16 public: 16 public:
17 using DeviceInfoCallback = 17 using DeviceInfoCallback =
18 base::Callback<void(const std::vector<VideoCaptureDeviceInfo>&)>; 18 base::Callback<void(const std::vector<VideoCaptureDeviceInfo>&)>;
19 19
20 virtual ~VideoCaptureSystem() {} 20 virtual ~VideoCaptureSystem() {}
21 21
22 // The passed-in |result_callback| must have ownership of the called 22 // The passed-in |result_callback| must have ownership of the called
23 // VideoCaptureSystem instance to guarantee that it stays alive during the 23 // VideoCaptureSystem instance to guarantee that it stays alive during the
24 // asynchronous operation. 24 // asynchronous operation. |result_callback| is invoked on the same thread
25 // that calls GetDeviceInfosAsync()
25 virtual void GetDeviceInfosAsync( 26 virtual void GetDeviceInfosAsync(
26 const DeviceInfoCallback& result_callback) = 0; 27 const DeviceInfoCallback& result_callback) = 0;
27 28
28 // Creates a VideoCaptureDevice object. Returns nullptr if something goes 29 // Creates a VideoCaptureDevice object. Returns nullptr if something goes
29 // wrong. 30 // wrong.
30 virtual std::unique_ptr<VideoCaptureDevice> CreateDevice( 31 virtual std::unique_ptr<VideoCaptureDevice> CreateDevice(
31 const std::string& device_id) = 0; 32 const std::string& device_id) = 0;
32 }; 33 };
33 34
34 } // namespace media 35 } // namespace media
35 36
36 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_SYSTEM_H_ 37 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_SYSTEM_H_
OLDNEW
« no previous file with comments | « content/utility/utility_service_factory.cc ('k') | services/video_capture/device_factory_media_to_mojo_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698