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

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: Removed whitespaces... Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media/media_stream_track.h ('k') | content/renderer/media/media_stream_video_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4164ffbdf05cbb90c4813bca33fb60549ab11e12..1b9bad51d79f6ba32cd08cd401cabe8d4fa7e3e0 100644
--- a/content/renderer/media/media_stream_video_source.h
+++ b/content/renderer/media/media_stream_video_source.h
@@ -25,6 +25,7 @@ class VideoFrame;
namespace content {
class MediaStreamDependencyFactory;
+class MediaStreamVideoTrack;
class WebRtcVideoCapturerAdapter;
// MediaStreamVideoSource is an interface used for sending video frames to a
@@ -49,11 +50,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.
@@ -158,6 +163,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_;
« no previous file with comments | « content/renderer/media/media_stream_track.h ('k') | content/renderer/media/media_stream_video_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698