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

Unified Diff: content/renderer/media/media_stream_video_source.h

Issue 155853002: Chrome MediaStream VideoTrack implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed a comment. Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/media_stream_video_source.h
diff --git a/content/renderer/media/media_stream_video_source.h b/content/renderer/media/media_stream_video_source.h
index 6f4fc442aafaa4621ba7f6d05ad6b47f1a730cd8..b6588557eb44c432467d9076299fb29a0c7eca65 100644
--- a/content/renderer/media/media_stream_video_source.h
+++ b/content/renderer/media/media_stream_video_source.h
@@ -24,6 +24,7 @@ class VideoFrame;
namespace content {
class MediaStreamDependencyFactory;
+class MediaStreamVideoTrack;
class WebRtcVideoCapturerAdapter;
// MediaStreamVideoSource is an interface used for sending video frames to a
@@ -48,11 +49,15 @@ class CONTENT_EXPORT MediaStreamVideoSource
explicit MediaStreamVideoSource(MediaStreamDependencyFactory* factory);
virtual ~MediaStreamVideoSource();
+ // Returns the MediaStreamVideoSource object owned by |source|.
+ static MediaStreamVideoSource* GetVideoSource(
+ const blink::WebMediaStreamSource& source);
+
// Puts |track| in the registered tracks list.
- virtual void AddTrack(const blink::WebMediaStreamTrack& track,
- const blink::WebMediaConstraints& constraints,
- const ConstraintsCallback& callback) OVERRIDE;
- virtual void RemoveTrack(const blink::WebMediaStreamTrack& track) OVERRIDE;
+ void AddTrack(MediaStreamVideoTrack* track,
+ const blink::WebMediaConstraints& constraints,
+ const ConstraintsCallback& callback);
+ void RemoveTrack(MediaStreamVideoTrack* track);
// TODO(ronghuawu): Remove webrtc::VideoSourceInterface from the public
// interface of this class.
@@ -154,6 +159,9 @@ class CONTENT_EXPORT MediaStreamVideoSource
media::VideoCaptureFormats supported_formats_;
+ // Tracks that currently are receiving video frames.
+ std::vector<MediaStreamVideoTrack*> tracks_;
+
// TODO(perkj): The below classes use webrtc/libjingle types. The goal is to
// get rid of them as far as possible.
MediaStreamDependencyFactory* factory_;

Powered by Google App Engine
This is Rietveld 408576698