| 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_SOURCE_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 virtual void RequestRefreshFrame() {} | 91 virtual void RequestRefreshFrame() {} |
| 92 | 92 |
| 93 // Notify underlying source if the capturing link is secure. | 93 // Notify underlying source if the capturing link is secure. |
| 94 virtual void SetCapturingLinkSecured(bool is_secure) {} | 94 virtual void SetCapturingLinkSecured(bool is_secure) {} |
| 95 | 95 |
| 96 // Returns the task runner where video frames will be delivered on. | 96 // Returns the task runner where video frames will be delivered on. |
| 97 base::SingleThreadTaskRunner* io_task_runner() const; | 97 base::SingleThreadTaskRunner* io_task_runner() const; |
| 98 | 98 |
| 99 const media::VideoCaptureFormat* GetCurrentFormat() const; | 99 const media::VideoCaptureFormat* GetCurrentFormat() const; |
| 100 | 100 |
| 101 base::WeakPtr<MediaStreamVideoSource> GetWeakPtr() { |
| 102 return weak_factory_.GetWeakPtr(); |
| 103 } |
| 104 |
| 101 protected: | 105 protected: |
| 102 void DoStopSource() override; | 106 void DoStopSource() override; |
| 103 | 107 |
| 104 // Sets ready state and notifies the ready state to all registered tracks. | 108 // Sets ready state and notifies the ready state to all registered tracks. |
| 105 virtual void SetReadyState(blink::WebMediaStreamSource::ReadyState state); | 109 virtual void SetReadyState(blink::WebMediaStreamSource::ReadyState state); |
| 106 | 110 |
| 107 // Sets muted state and notifies it to all registered tracks. | 111 // Sets muted state and notifies it to all registered tracks. |
| 108 virtual void SetMutedState(bool state); | 112 virtual void SetMutedState(bool state); |
| 109 | 113 |
| 110 // An implementation must fetch the formats that can currently be used by | 114 // An implementation must fetch the formats that can currently be used by |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 202 |
| 199 // NOTE: Weak pointers must be invalidated before all other member variables. | 203 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 200 base::WeakPtrFactory<MediaStreamVideoSource> weak_factory_; | 204 base::WeakPtrFactory<MediaStreamVideoSource> weak_factory_; |
| 201 | 205 |
| 202 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoSource); | 206 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoSource); |
| 203 }; | 207 }; |
| 204 | 208 |
| 205 } // namespace content | 209 } // namespace content |
| 206 | 210 |
| 207 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ | 211 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ |
| OLD | NEW |