| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 friend class MediaStreamVideoCapturerSourceTest; | 44 friend class MediaStreamVideoCapturerSourceTest; |
| 45 friend class MediaStreamVideoCapturerSourceOldConstraintsTest; | 45 friend class MediaStreamVideoCapturerSourceOldConstraintsTest; |
| 46 | 46 |
| 47 // MediaStreamVideoSource overrides. | 47 // MediaStreamVideoSource overrides. |
| 48 void RequestRefreshFrame() override; | 48 void RequestRefreshFrame() override; |
| 49 void OnHasConsumers(bool has_consumers) override; | 49 void OnHasConsumers(bool has_consumers) override; |
| 50 void OnCapturingLinkSecured(bool is_secure) override; | 50 void OnCapturingLinkSecured(bool is_secure) override; |
| 51 void StartSourceImpl( | 51 void StartSourceImpl( |
| 52 const VideoCaptureDeliverFrameCB& frame_callback) override; | 52 const VideoCaptureDeliverFrameCB& frame_callback) override; |
| 53 void StopSourceImpl() override; | 53 void StopSourceImpl() override; |
| 54 base::Optional<media::VideoCaptureFormat> GetCurrentFormatImpl() | 54 base::Optional<media::VideoCaptureFormat> GetCurrentFormat() const override; |
| 55 const override; | |
| 56 | 55 |
| 57 // RenderFrameObserver implementation. | 56 // RenderFrameObserver implementation. |
| 58 void OnDestruct() final {} | 57 void OnDestruct() final {} |
| 59 | 58 |
| 60 // Method to bind as RunningCallback in VideoCapturerSource::StartCapture(). | 59 // Method to bind as RunningCallback in VideoCapturerSource::StartCapture(). |
| 61 void OnRunStateChanged(bool is_running); | 60 void OnRunStateChanged(bool is_running); |
| 62 | 61 |
| 63 // The source that provides video frames. | 62 // The source that provides video frames. |
| 64 const std::unique_ptr<media::VideoCapturerSource> source_; | 63 const std::unique_ptr<media::VideoCapturerSource> source_; |
| 65 | 64 |
| 66 // Indicates whether the capture is in starting. It is set to true by | 65 // Indicates whether the capture is in starting. It is set to true by |
| 67 // StartSourceImpl() when starting the capture, and is reset after starting | 66 // StartSourceImpl() when starting the capture, and is reset after starting |
| 68 // is completed. | 67 // is completed. |
| 69 bool is_capture_starting_ = false; | 68 bool is_capture_starting_ = false; |
| 70 | 69 |
| 71 media::VideoCaptureParams capture_params_; | 70 media::VideoCaptureParams capture_params_; |
| 72 | 71 |
| 73 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoCapturerSource); | 72 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoCapturerSource); |
| 74 }; | 73 }; |
| 75 | 74 |
| 76 } // namespace content | 75 } // namespace content |
| 77 | 76 |
| 78 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_ | 77 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_ |
| OLD | NEW |