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 17 matching lines...) Expand all Loading... |
28 MediaStreamVideoCapturerSource( | 28 MediaStreamVideoCapturerSource( |
29 const SourceStoppedCallback& stop_callback, | 29 const SourceStoppedCallback& stop_callback, |
30 std::unique_ptr<media::VideoCapturerSource> source); | 30 std::unique_ptr<media::VideoCapturerSource> source); |
31 MediaStreamVideoCapturerSource(const SourceStoppedCallback& stop_callback, | 31 MediaStreamVideoCapturerSource(const SourceStoppedCallback& stop_callback, |
32 const StreamDeviceInfo& device_info); | 32 const StreamDeviceInfo& device_info); |
33 ~MediaStreamVideoCapturerSource() override; | 33 ~MediaStreamVideoCapturerSource() override; |
34 | 34 |
35 // Implements MediaStreamVideoSource. | 35 // Implements MediaStreamVideoSource. |
36 void RequestRefreshFrame() override; | 36 void RequestRefreshFrame() override; |
37 | 37 |
| 38 void SetCapturingLinkSecured(bool is_secure) override; |
| 39 |
38 private: | 40 private: |
39 friend class CanvasCaptureHandlerTest; | 41 friend class CanvasCaptureHandlerTest; |
40 friend class MediaStreamVideoCapturerSourceTest; | 42 friend class MediaStreamVideoCapturerSourceTest; |
41 | 43 |
42 // Implements MediaStreamVideoSource. | 44 // Implements MediaStreamVideoSource. |
43 void GetCurrentSupportedFormats( | 45 void GetCurrentSupportedFormats( |
44 int max_requested_width, | 46 int max_requested_width, |
45 int max_requested_height, | 47 int max_requested_height, |
46 double max_requested_frame_rate, | 48 double max_requested_frame_rate, |
47 const VideoCaptureDeviceFormatsCB& callback) override; | 49 const VideoCaptureDeviceFormatsCB& callback) override; |
48 void StartSourceImpl( | 50 void StartSourceImpl( |
49 const media::VideoCaptureFormat& format, | 51 const media::VideoCaptureFormat& format, |
50 const blink::WebMediaConstraints& constraints, | 52 const blink::WebMediaConstraints& constraints, |
51 const VideoCaptureDeliverFrameCB& frame_callback) override; | 53 const VideoCaptureDeliverFrameCB& frame_callback) override; |
52 void StopSourceImpl() override; | 54 void StopSourceImpl() override; |
53 | 55 |
54 // Method to bind as RunningCallback in VideoCapturerSource::StartCapture(). | 56 // Method to bind as RunningCallback in VideoCapturerSource::StartCapture(). |
55 void OnStarted(bool result); | 57 void OnStarted(bool result); |
56 | 58 |
57 const char* GetPowerLineFrequencyForTesting() const; | 59 const char* GetPowerLineFrequencyForTesting() const; |
58 | 60 |
59 // The source that provides video frames. | 61 // The source that provides video frames. |
60 const std::unique_ptr<media::VideoCapturerSource> source_; | 62 const std::unique_ptr<media::VideoCapturerSource> source_; |
61 | 63 |
| 64 // Return true if the video frames are from local video capturer. |
| 65 bool is_local_video_capturer_source_; |
| 66 |
62 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoCapturerSource); | 67 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoCapturerSource); |
63 }; | 68 }; |
64 | 69 |
65 } // namespace content | 70 } // namespace content |
66 | 71 |
67 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_ | 72 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_ |
OLD | NEW |