| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 void StartSourceImpl( | 51 void StartSourceImpl( |
| 52 const media::VideoCaptureFormat& format, | 52 const media::VideoCaptureFormat& format, |
| 53 const blink::WebMediaConstraints& constraints, | 53 const blink::WebMediaConstraints& constraints, |
| 54 const VideoCaptureDeliverFrameCB& frame_callback) override; | 54 const VideoCaptureDeliverFrameCB& frame_callback) override; |
| 55 void StopSourceImpl() override; | 55 void StopSourceImpl() override; |
| 56 | 56 |
| 57 // RenderFrameObserver implementation. | 57 // RenderFrameObserver implementation. |
| 58 void OnDestruct() final {} | 58 void OnDestruct() final {} |
| 59 | 59 |
| 60 // Method to bind as RunningCallback in VideoCapturerSource::StartCapture(). | 60 // Method to bind as RunningCallback in VideoCapturerSource::StartCapture(). |
| 61 void OnStarted(bool result); | 61 void OnRunStateChanged(bool is_running); |
| 62 | 62 |
| 63 const char* GetPowerLineFrequencyForTesting() const; | 63 const char* GetPowerLineFrequencyForTesting() const; |
| 64 | 64 |
| 65 // The source that provides video frames. | 65 // The source that provides video frames. |
| 66 const std::unique_ptr<media::VideoCapturerSource> source_; | 66 const std::unique_ptr<media::VideoCapturerSource> source_; |
| 67 | 67 |
| 68 // Indicates whether the capture is in starting. It is set to true by |
| 69 // StartSourceImpl() when starting the capture, and is reset after starting |
| 70 // is completed. |
| 71 bool is_capture_starting_ = false; |
| 72 |
| 68 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoCapturerSource); | 73 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoCapturerSource); |
| 69 }; | 74 }; |
| 70 | 75 |
| 71 } // namespace content | 76 } // namespace content |
| 72 | 77 |
| 73 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_ | 78 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURER_SOURCE_H_ |
| OLD | NEW |