OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_SCREEN_CAPTURER_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_SCREEN_CAPTURER_H_ |
| 7 |
| 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "media/base/media_export.h" |
| 11 #include "media/video/capture/screen/screen_capturer.h" |
| 12 #include "media/video/capture/video_capture_device.h" |
| 13 #include "third_party/skia/include/core/SkBitmap.h" |
| 14 |
| 15 namespace base { |
| 16 class SequencedTaskRunner; |
| 17 } // namespace base |
| 18 |
| 19 namespace media { |
| 20 |
| 21 // ScreenCaptureDevice implements VideoCaptureDevice for the screen. It's |
| 22 // essentially an adapter between ScreenCapturer and VideoCaptureDevice. |
| 23 class MEDIA_EXPORT ScreenCaptureDevice : public VideoCaptureDevice { |
| 24 public: |
| 25 explicit ScreenCaptureDevice( |
| 26 scoped_refptr<base::SequencedTaskRunner> task_runner); |
| 27 virtual ~ScreenCaptureDevice(); |
| 28 |
| 29 // Helper used in tests to supply a fake capturer. |
| 30 void SetScreenCapturerForTest( |
| 31 scoped_ptr<media::ScreenCapturer> capturer); |
| 32 |
| 33 // VideoCaptureDevice interface. |
| 34 virtual void Allocate(int width, int height, |
| 35 int frame_rate, |
| 36 EventHandler* event_handler) OVERRIDE; |
| 37 virtual void Start() OVERRIDE; |
| 38 virtual void Stop() OVERRIDE; |
| 39 virtual void DeAllocate() OVERRIDE; |
| 40 virtual const Name& device_name() OVERRIDE; |
| 41 |
| 42 private: |
| 43 class Core; |
| 44 scoped_refptr<Core> core_; |
| 45 Name name_; |
| 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(ScreenCaptureDevice); |
| 48 }; |
| 49 |
| 50 } // namespace media |
| 51 |
| 52 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_SCREEN_CAPTURER_H_ |
OLD | NEW |