Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Side by Side Diff: content/renderer/media/media_stream_video_source.h

Issue 1829193003: Request frame for new sinks from MediaStreamVideoTrack (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: miu@ nit. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Puts |track| in the registered tracks list. 77 // Puts |track| in the registered tracks list.
78 void AddTrack(MediaStreamVideoTrack* track, 78 void AddTrack(MediaStreamVideoTrack* track,
79 const VideoCaptureDeliverFrameCB& frame_callback, 79 const VideoCaptureDeliverFrameCB& frame_callback,
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 // Request underlying source to capture a new frame.
88 virtual void RequestRefreshFrame() {}
89
87 // Returns the task runner where video frames will be delivered on. 90 // Returns the task runner where video frames will be delivered on.
88 base::SingleThreadTaskRunner* io_task_runner() const; 91 base::SingleThreadTaskRunner* io_task_runner() const;
89 92
90 const media::VideoCaptureFormat* GetCurrentFormat() const; 93 const media::VideoCaptureFormat* GetCurrentFormat() const;
91 94
92 protected: 95 protected:
93 void DoStopSource() override; 96 void DoStopSource() override;
94 97
95 // Sets ready state and notifies the ready state to all registered tracks. 98 // Sets ready state and notifies the ready state to all registered tracks.
96 virtual void SetReadyState(blink::WebMediaStreamSource::ReadyState state); 99 virtual void SetReadyState(blink::WebMediaStreamSource::ReadyState state);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 189
187 // NOTE: Weak pointers must be invalidated before all other member variables. 190 // NOTE: Weak pointers must be invalidated before all other member variables.
188 base::WeakPtrFactory<MediaStreamVideoSource> weak_factory_; 191 base::WeakPtrFactory<MediaStreamVideoSource> weak_factory_;
189 192
190 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoSource); 193 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoSource);
191 }; 194 };
192 195
193 } // namespace content 196 } // namespace content
194 197
195 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ 198 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698