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..3967582a896da0f67d655145df1fcf37cde8aa31 100644 |
--- a/content/renderer/media/media_stream_video_source.h |
+++ b/content/renderer/media/media_stream_video_source.h |
@@ -11,6 +11,7 @@ |
#include "content/common/content_export.h" |
#include "content/renderer/media/media_stream_dependency_factory.h" |
#include "content/renderer/media/media_stream_source.h" |
+#include "content/renderer/media/media_stream_video_track.h" |
#include "media/base/video_frame.h" |
#include "media/video/capture/video_capture_types.h" |
#include "third_party/WebKit/public/platform/WebMediaConstraints.h" |
@@ -24,6 +25,7 @@ class VideoFrame; |
namespace content { |
class MediaStreamDependencyFactory; |
+class MediaStreamVideoTrack; |
class WebRtcVideoCapturerAdapter; |
// MediaStreamVideoSource is an interface used for sending video frames to a |
@@ -48,11 +50,14 @@ class CONTENT_EXPORT MediaStreamVideoSource |
explicit MediaStreamVideoSource(MediaStreamDependencyFactory* factory); |
virtual ~MediaStreamVideoSource(); |
+ static MediaStreamVideoSource* GetVideoSource( |
Ronghua Wu (Left Chromium)
2014/03/01 01:26:04
Put comments.
perkj_chrome
2014/03/02 09:20:44
Done.
|
+ const blink::WebMediaStreamSource& source); |
+ |
// Puts |track| in the registered tracks list. |
virtual void AddTrack(const blink::WebMediaStreamTrack& track, |
Alpha Left Google
2014/02/28 02:49:22
This is odd. I think it should just take the nativ
Ronghua Wu (Left Chromium)
2014/03/01 01:26:04
Make sense.
And I saw you called RemoveTrack from
perkj_chrome
2014/03/02 09:20:44
I can not call AddTrack in the ctor. gUM needs to
perkj_chrome
2014/03/02 09:20:44
ok - but then I need to change the base class and
Alpha Left Google
2014/03/03 06:45:04
Okay.
|
const blink::WebMediaConstraints& constraints, |
const ConstraintsCallback& callback) OVERRIDE; |
- virtual void RemoveTrack(const blink::WebMediaStreamTrack& track) OVERRIDE; |
+ 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_; |