OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_DESKTOP_CAPTURE_DEVICE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_DESKTOP_CAPTURE_DEVICE_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_DESKTOP_CAPTURE_DEVICE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_DESKTOP_CAPTURE_DEVICE_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 #include "media/video/capture/video_capture_device.h" | 11 #include "media/video/capture/video_capture_device.h" |
12 | 12 |
13 namespace base { | 13 namespace base { |
14 class SequencedTaskRunner; | 14 class SequencedTaskRunner; |
15 } // namespace base | 15 } // namespace base |
16 | 16 |
17 namespace webrtc { | 17 namespace webrtc { |
18 class DesktopCapturer; | 18 class DesktopCapturer; |
19 } // namespace webrtc | 19 } // namespace webrtc |
20 | 20 |
21 namespace content { | 21 namespace content { |
22 | 22 |
23 struct DesktopMediaID; | 23 struct DesktopMediaID; |
24 | 24 |
25 // DesktopCaptureDevice implements VideoCaptureDevice for screens and windows. | 25 // DesktopCaptureDevice implements VideoCaptureDevice for screens and windows. |
26 // It's essentially an adapter between webrtc::DesktopCapturer and | 26 // It's essentially an adapter between webrtc::DesktopCapturer and |
27 // VideoCaptureDevice. | 27 // VideoCaptureDevice. |
28 class CONTENT_EXPORT DesktopCaptureDevice : public media::VideoCaptureDevice { | 28 class CONTENT_EXPORT DesktopCaptureDevice : public media::VideoCaptureDevice1 { |
29 public: | 29 public: |
30 // Creates capturer for the specified |source| and then creates | 30 // Creates capturer for the specified |source| and then creates |
31 // DesktopCaptureDevice for it. May return NULL in case of a failure (e.g. if | 31 // DesktopCaptureDevice for it. May return NULL in case of a failure (e.g. if |
32 // requested window was destroyed). | 32 // requested window was destroyed). |
33 static scoped_ptr<media::VideoCaptureDevice> Create( | 33 static scoped_ptr<media::VideoCaptureDevice> Create( |
34 const DesktopMediaID& source); | 34 const DesktopMediaID& source); |
35 | 35 |
36 DesktopCaptureDevice(scoped_refptr<base::SequencedTaskRunner> task_runner, | 36 DesktopCaptureDevice(scoped_refptr<base::SequencedTaskRunner> task_runner, |
37 scoped_ptr<webrtc::DesktopCapturer> desktop_capturer); | 37 scoped_ptr<webrtc::DesktopCapturer> desktop_capturer); |
38 virtual ~DesktopCaptureDevice(); | 38 virtual ~DesktopCaptureDevice(); |
(...skipping 10 matching lines...) Expand all Loading... |
49 class Core; | 49 class Core; |
50 scoped_refptr<Core> core_; | 50 scoped_refptr<Core> core_; |
51 Name name_; | 51 Name name_; |
52 | 52 |
53 DISALLOW_COPY_AND_ASSIGN(DesktopCaptureDevice); | 53 DISALLOW_COPY_AND_ASSIGN(DesktopCaptureDevice); |
54 }; | 54 }; |
55 | 55 |
56 } // namespace content | 56 } // namespace content |
57 | 57 |
58 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_DESKTOP_CAPTURE_DEVICE_H_ | 58 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_DESKTOP_CAPTURE_DEVICE_H_ |
OLD | NEW |