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

Side by Side Diff: content/browser/media/capture/web_contents_video_capture_device.h

Issue 2702093002: Consistent CopyFromSurface() API, consolidated to RWHV (Closed)
Patch Set: REBASE Created 3 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_MEDIA_CAPTURE_WEB_CONTENTS_VIDEO_CAPTURE_DEVICE_H_ 5 #ifndef CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_VIDEO_CAPTURE_DEVICE_H_
6 #define CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_VIDEO_CAPTURE_DEVICE_H_ 6 #define CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_VIDEO_CAPTURE_DEVICE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "media/capture/content/screen_capture_device_core.h" 13 #include "media/capture/content/screen_capture_device_core.h"
14 #include "media/capture/video/video_capture_device.h" 14 #include "media/capture/video/video_capture_device.h"
15 15
16 namespace content { 16 namespace content {
17 17
18 // A virtualized VideoCaptureDevice that captures the displayed contents of a 18 // A virtualized VideoCaptureDevice that captures the displayed contents of a
19 // WebContents (i.e., the composition of an entire render frame tree), producing 19 // WebContents (i.e., the composition of an entire render frame tree), producing
20 // a stream of video frames. As such, WebContentsVideoCaptureDevice is only 20 // a stream of video frames. As such, WebContentsVideoCaptureDevice is only
21 // supported on platforms that use the Chromium compositor, have a 21 // supported on platforms that use the Chromium compositor, have a
22 // content::RenderWidgetHostView implementation that supports frame subscription 22 // content::RenderWidgetHostView implementation that supports frame subscription
23 // (via BeginFrameSubscription()), and can perform read-back into 23 // (via BeginFrameSubscription()), and can perform read-back into
24 // media::VideoFrames (i.e., 24 // media::VideoFrames (i.e.,
25 // RenderWidgetHostViewBase::CopyFromCompositingSurfaceToVideoFrame() is 25 // RenderWidgetHostViewBase::CopyFromSurfaceToVideoFrame() is functional).
26 // functional).
27 // 26 //
28 // An instance is created by providing a device_id. The device_id contains 27 // An instance is created by providing a device_id. The device_id contains
29 // information necessary for finding a WebContents instance. From then on, 28 // information necessary for finding a WebContents instance. From then on,
30 // WebContentsVideoCaptureDevice will capture from the RenderWidgetHost that 29 // WebContentsVideoCaptureDevice will capture from the RenderWidgetHost that
31 // encompasses the currently active RenderFrameHost tree for that that 30 // encompasses the currently active RenderFrameHost tree for that that
32 // WebContents instance. As the RenderFrameHost tree mutates (e.g., due to page 31 // WebContents instance. As the RenderFrameHost tree mutates (e.g., due to page
33 // navigations, or crashes/reloads), capture will continue without interruption. 32 // navigations, or crashes/reloads), capture will continue without interruption.
34 class CONTENT_EXPORT WebContentsVideoCaptureDevice 33 class CONTENT_EXPORT WebContentsVideoCaptureDevice
35 : public media::VideoCaptureDevice { 34 : public media::VideoCaptureDevice {
36 public: 35 public:
(...skipping 21 matching lines...) Expand all
58 57
59 const std::unique_ptr<media::ScreenCaptureDeviceCore> core_; 58 const std::unique_ptr<media::ScreenCaptureDeviceCore> core_;
60 59
61 DISALLOW_COPY_AND_ASSIGN(WebContentsVideoCaptureDevice); 60 DISALLOW_COPY_AND_ASSIGN(WebContentsVideoCaptureDevice);
62 }; 61 };
63 62
64 63
65 } // namespace content 64 } // namespace content
66 65
67 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_VIDEO_CAPTURE_DEVICE_H_ 66 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_VIDEO_CAPTURE_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698