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

Side by Side Diff: content/browser/renderer_host/media/buildable_video_capture_device.h

Issue 2769543002: [Mojo Video Capture] Introduce abstraction VideoCaptureSystem (Closed)
Patch Set: Incorporated suggestions from PatchSet 5 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
« no previous file with comments | « no previous file | content/browser/renderer_host/media/in_process_buildable_video_capture_device.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CONTENT_BROWSER_RENDERER_HOST_MEDIA_BUILDABLE_VIDEO_CAPTURE_DEVICE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_BUILDABLE_VIDEO_CAPTURE_DEVICE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_BUILDABLE_VIDEO_CAPTURE_DEVICE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_BUILDABLE_VIDEO_CAPTURE_DEVICE_H_
7 7
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "content/public/common/media_stream_request.h" 10 #include "content/public/common/media_stream_request.h"
(...skipping 12 matching lines...) Expand all
23 // instance of Callbacks. Once the device has been built successfully, the 23 // instance of Callbacks. Once the device has been built successfully, the
24 // "Device operation methods", are allowed to be called. ReleaseDeviceAsync() 24 // "Device operation methods", are allowed to be called. ReleaseDeviceAsync()
25 // must be called in order to release the device if it has before been built 25 // must be called in order to release the device if it has before been built
26 // successfully. After calling ReleaseDeviceAsync(), it is legal to call 26 // successfully. After calling ReleaseDeviceAsync(), it is legal to call
27 // CreateAndStartDeviceAsync() to rebuild and start the device again. 27 // CreateAndStartDeviceAsync() to rebuild and start the device again.
28 class CONTENT_EXPORT BuildableVideoCaptureDevice { 28 class CONTENT_EXPORT BuildableVideoCaptureDevice {
29 public: 29 public:
30 class CONTENT_EXPORT Callbacks { 30 class CONTENT_EXPORT Callbacks {
31 public: 31 public:
32 virtual ~Callbacks() {} 32 virtual ~Callbacks() {}
33 // Returns nullptr if no descriptor was found. 33 virtual void OnDeviceStarted(VideoCaptureController* controller) = 0;
34 virtual const media::VideoCaptureDeviceDescriptor* LookupDeviceDescriptor(
35 const std::string& id) = 0;
36 virtual void WillStartDevice(media::VideoFacingMode facing_mode) = 0;
37 virtual void DidStartDevice(VideoCaptureController* controller) = 0;
38 virtual void OnDeviceStartFailed(VideoCaptureController* controller) = 0; 34 virtual void OnDeviceStartFailed(VideoCaptureController* controller) = 0;
39 virtual void OnDeviceStartAborted() = 0; 35 virtual void OnDeviceStartAborted() = 0;
40 }; 36 };
41 37
42 virtual ~BuildableVideoCaptureDevice() {} 38 virtual ~BuildableVideoCaptureDevice() {}
43 39
44 // Device management methods. 40 // Device management methods.
45 virtual void CreateAndStartDeviceAsync( 41 virtual void CreateAndStartDeviceAsync(
46 VideoCaptureController* controller, 42 VideoCaptureController* controller,
47 const media::VideoCaptureParams& params, 43 const media::VideoCaptureParams& params,
(...skipping 17 matching lines...) Expand all
65 virtual void RequestRefreshFrame() = 0; 61 virtual void RequestRefreshFrame() = 0;
66 62
67 // Methods for specific types of devices. 63 // Methods for specific types of devices.
68 virtual void SetDesktopCaptureWindowIdAsync(gfx::NativeViewId window_id, 64 virtual void SetDesktopCaptureWindowIdAsync(gfx::NativeViewId window_id,
69 base::OnceClosure done_cb) = 0; 65 base::OnceClosure done_cb) = 0;
70 }; 66 };
71 67
72 } // namespace content 68 } // namespace content
73 69
74 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_BUILDABLE_VIDEO_CAPTURE_DEVICE_H_ 70 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_BUILDABLE_VIDEO_CAPTURE_DEVICE_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/media/in_process_buildable_video_capture_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698