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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 int max_requested_width, | 49 int max_requested_width, |
50 int max_requested_height, | 50 int max_requested_height, |
51 double max_requested_frame_rate, | 51 double max_requested_frame_rate, |
52 const VideoCaptureDeviceFormatsCB& callback) override; | 52 const VideoCaptureDeviceFormatsCB& callback) override; |
53 void StartSourceImpl( | 53 void StartSourceImpl( |
54 const media::VideoCaptureFormat& format, | 54 const media::VideoCaptureFormat& format, |
55 const blink::WebMediaConstraints& constraints, | 55 const blink::WebMediaConstraints& constraints, |
56 const VideoCaptureDeliverFrameCB& frame_callback) override; | 56 const VideoCaptureDeliverFrameCB& frame_callback) override; |
57 void StopSourceImpl() override; | 57 void StopSourceImpl() override; |
58 | 58 |
59 // RenderFrame does NOT own this object. Avoid unintended multiple destruction | 59 // RenderFrameObserver implementation. |
60 // by overriding RenderFrameObserver::OnDestruct(). | |
61 void OnDestruct() final {} | 60 void OnDestruct() final {} |
62 | 61 |
63 // Method to bind as RunningCallback in VideoCapturerSource::StartCapture(). | 62 // Method to bind as RunningCallback in VideoCapturerSource::StartCapture(). |
64 void OnStarted(bool result); | 63 void OnStarted(bool result); |
65 | 64 |
66 const char* GetPowerLineFrequencyForTesting() const; | 65 const char* GetPowerLineFrequencyForTesting() const; |
67 | 66 |
68 // The source that provides video frames. | 67 // The source that provides video frames. |
69 const std::unique_ptr<media::VideoCapturerSource> source_; | 68 const std::unique_ptr<media::VideoCapturerSource> source_; |
70 | 69 |
71 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoCapturerSource); | 70 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoCapturerSource); |
72 }; | 71 }; |
73 | 72 |
74 } // namespace content | 73 } // namespace content |
75 | 74 |
76 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_ | 75 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_ |
OLD | NEW |