| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 // look for, or by plugging in a |source| constructed elsewhere. | 24 // look for, or by plugging in a |source| constructed elsewhere. |
| 25 class CONTENT_EXPORT MediaStreamVideoCapturerSource | 25 class CONTENT_EXPORT MediaStreamVideoCapturerSource |
| 26 : public MediaStreamVideoSource { | 26 : public MediaStreamVideoSource { |
| 27 public: | 27 public: |
| 28 MediaStreamVideoCapturerSource(const SourceStoppedCallback& stop_callback, | 28 MediaStreamVideoCapturerSource(const SourceStoppedCallback& stop_callback, |
| 29 scoped_ptr<media::VideoCapturerSource> source); | 29 scoped_ptr<media::VideoCapturerSource> source); |
| 30 MediaStreamVideoCapturerSource(const SourceStoppedCallback& stop_callback, | 30 MediaStreamVideoCapturerSource(const SourceStoppedCallback& stop_callback, |
| 31 const StreamDeviceInfo& device_info); | 31 const StreamDeviceInfo& device_info); |
| 32 ~MediaStreamVideoCapturerSource() override; | 32 ~MediaStreamVideoCapturerSource() override; |
| 33 | 33 |
| 34 // Implements MediaStreamVideoSource. |
| 35 void RequestRefreshFrame() override; |
| 36 |
| 34 private: | 37 private: |
| 35 friend class CanvasCaptureHandlerTest; | 38 friend class CanvasCaptureHandlerTest; |
| 36 friend class MediaStreamVideoCapturerSourceTest; | 39 friend class MediaStreamVideoCapturerSourceTest; |
| 37 | 40 |
| 38 // Implements MediaStreamVideoSource. | 41 // Implements MediaStreamVideoSource. |
| 39 void GetCurrentSupportedFormats( | 42 void GetCurrentSupportedFormats( |
| 40 int max_requested_width, | 43 int max_requested_width, |
| 41 int max_requested_height, | 44 int max_requested_height, |
| 42 double max_requested_frame_rate, | 45 double max_requested_frame_rate, |
| 43 const VideoCaptureDeviceFormatsCB& callback) override; | 46 const VideoCaptureDeviceFormatsCB& callback) override; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 54 | 57 |
| 55 // The source that provides video frames. | 58 // The source that provides video frames. |
| 56 const scoped_ptr<media::VideoCapturerSource> source_; | 59 const scoped_ptr<media::VideoCapturerSource> source_; |
| 57 | 60 |
| 58 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoCapturerSource); | 61 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoCapturerSource); |
| 59 }; | 62 }; |
| 60 | 63 |
| 61 } // namespace content | 64 } // namespace content |
| 62 | 65 |
| 63 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_ | 66 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_ |
| OLD | NEW |