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

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

Issue 129923002: Implements MediaStreamVideoSource. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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 2130916b1b9c296813fbb94b9234241a8e916385..534593313ad606fd2b6629daf69b3a538a9235e0 100644
--- a/content/renderer/media/media_stream_video_source.h
+++ b/content/renderer/media/media_stream_video_source.h
@@ -19,6 +19,8 @@ class VideoFrame;
namespace content {
+class MediaStreamDependencyFactory;
+
// MediaStreamVideoSource is an interface used for sending video frames to a
// MediaStreamVideoTrack.
// http://dev.w3.org/2011/webrtc/editor/getusermedia.html
@@ -26,14 +28,18 @@ namespace content {
class CONTENT_EXPORT MediaStreamVideoSource
: public MediaStreamSourceExtraData {
public:
+ MediaStreamVideoSource(MediaStreamDependencyFactory* factory);
+
+ bool Init();
+
// Puts |track| in the registered tracks list. Will later
// deliver frames to it according to |constraints|.
- void AddTrack(const blink::WebMediaStreamTrack& track,
+ bool AddTrack(const blink::WebMediaStreamTrack& track,
const blink::WebMediaConstraints& constraints);
// Removes |track| from the registered tracks list, i.e. will stop delivering
// frame to |track|.
- void RemoveTrack(const blink::WebMediaStreamTrack& track);
+ bool RemoveTrack(const blink::WebMediaStreamTrack& track);
protected:
// Sets ready state and notifies the ready state to all registered tracks.
@@ -43,6 +49,12 @@ class CONTENT_EXPORT MediaStreamVideoSource
virtual void DeliverVideoFrame(const scoped_refptr<media::VideoFrame>& frame);
virtual ~MediaStreamVideoSource();
+
+ private:
+ MediaStreamDependencyFactory* factory_;
+ scoped_refptr<webrtc::VideoSourceInterface> adapter_;
+ int width_;
+ int height_;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698