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

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

Issue 131763002: Adds MediaStreamSource, MediaStreamAudioSource and MediaStreamVideoCaptureDeviceSource (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. 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..7e27a850f5f8cb3e99421ebdbbd386205e6c887b 100644
--- a/content/renderer/media/media_stream_video_source.h
+++ b/content/renderer/media/media_stream_video_source.h
@@ -6,9 +6,8 @@
#define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_
#include "base/compiler_specific.h"
-#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
-#include "content/renderer/media/media_stream_source_extra_data.h"
+#include "content/renderer/media/media_stream_source.h"
#include "third_party/WebKit/public/platform/WebMediaConstraints.h"
#include "third_party/WebKit/public/platform/WebMediaStreamSource.h"
#include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
@@ -24,25 +23,30 @@ namespace content {
// http://dev.w3.org/2011/webrtc/editor/getusermedia.html
// All methods calls will be done from the main render thread.
class CONTENT_EXPORT MediaStreamVideoSource
- : public MediaStreamSourceExtraData {
+ : public MediaStreamSource {
public:
+ MediaStreamVideoSource();
// Puts |track| in the registered tracks list. Will later
// deliver frames to it according to |constraints|.
- void 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 AddTrack(const blink::WebMediaStreamTrack& track);
void RemoveTrack(const blink::WebMediaStreamTrack& track);
+ webrtc::VideoSourceInterface* GetAdapter() {
Ronghua Wu (Left Chromium) 2014/01/10 20:01:08 I think the derived class of this class shouldn't
perkj_chrome 2014/01/12 19:34:38 I don't think that will work until we have properl
+ return adapter_;
+ }
+
protected:
+ void SetAdapter(
+ const scoped_refptr<webrtc::VideoSourceInterface>& adapter);
// Sets ready state and notifies the ready state to all registered tracks.
virtual void SetReadyState(blink::WebMediaStreamSource::ReadyState state);
// Delivers |frame| to registered tracks according to their constraints.
virtual void DeliverVideoFrame(const scoped_refptr<media::VideoFrame>& frame);
-
virtual ~MediaStreamVideoSource();
+
+ private:
+ scoped_refptr<webrtc::VideoSourceInterface> adapter_;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698