| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 const blink::WebMediaConstraints& constraints, | 80 const blink::WebMediaConstraints& constraints, |
| 81 const ConstraintsCallback& callback); | 81 const ConstraintsCallback& callback); |
| 82 void RemoveTrack(MediaStreamVideoTrack* track); | 82 void RemoveTrack(MediaStreamVideoTrack* track); |
| 83 | 83 |
| 84 // Return true if |name| is a constraint supported by MediaStreamVideoSource. | 84 // Return true if |name| is a constraint supported by MediaStreamVideoSource. |
| 85 static bool IsConstraintSupported(const std::string& name); | 85 static bool IsConstraintSupported(const std::string& name); |
| 86 | 86 |
| 87 // Returns the task runner where video frames will be delivered on. | 87 // Returns the task runner where video frames will be delivered on. |
| 88 base::SingleThreadTaskRunner* io_task_runner() const; | 88 base::SingleThreadTaskRunner* io_task_runner() const; |
| 89 | 89 |
| 90 const media::VideoCaptureFormat* GetCurrentFormat() const; |
| 91 |
| 90 protected: | 92 protected: |
| 91 void DoStopSource() override; | 93 void DoStopSource() override; |
| 92 | 94 |
| 93 // Sets ready state and notifies the ready state to all registered tracks. | 95 // Sets ready state and notifies the ready state to all registered tracks. |
| 94 virtual void SetReadyState(blink::WebMediaStreamSource::ReadyState state); | 96 virtual void SetReadyState(blink::WebMediaStreamSource::ReadyState state); |
| 95 | 97 |
| 96 // Sets muted state and notifies it to all registered tracks. | 98 // Sets muted state and notifies it to all registered tracks. |
| 97 virtual void SetMutedState(bool state); | 99 virtual void SetMutedState(bool state); |
| 98 | 100 |
| 99 // An implementation must fetch the formats that can currently be used by | 101 // An implementation must fetch the formats that can currently be used by |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 | 186 |
| 185 // NOTE: Weak pointers must be invalidated before all other member variables. | 187 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 186 base::WeakPtrFactory<MediaStreamVideoSource> weak_factory_; | 188 base::WeakPtrFactory<MediaStreamVideoSource> weak_factory_; |
| 187 | 189 |
| 188 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoSource); | 190 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoSource); |
| 189 }; | 191 }; |
| 190 | 192 |
| 191 } // namespace content | 193 } // namespace content |
| 192 | 194 |
| 193 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ | 195 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ |
| OLD | NEW |