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

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

Issue 99113003: Define the interface for MediaStreamVideoSource. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years 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/public/renderer/media_stream_video_source.h
===================================================================
--- content/public/renderer/media_stream_video_source.h (revision 0)
+++ content/public/renderer/media_stream_video_source.h (revision 0)
@@ -0,0 +1,46 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_VIDEO_SOURCE_H_
+#define CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_VIDEO_SOURCE_H_
perkj_chrome 2013/12/18 08:15:10 Why does the source have to be in content public?
Ronghua Wu (Left Chromium) 2013/12/18 21:22:23 I don't really know what is the content public abo
+
+#include "base/compiler_specific.h"
+#include "base/memory/ref_counted.h"
+#include "content/common/content_export.h"
+#include "content/public/renderer/media_stream_sink.h"
+#include "third_party/WebKit/public/platform/WebMediaConstraints.h"
+
+namespace media {
+class VideoFrame;
+}
+
+namespace blink {
+class WebMediaStreamTrack;
+}
+
+namespace content {
+
+class MediaStreamVideoSink;
+
+// MediaStreamVideoSink is an interface used for sending video frames to a
perkj_chrome 2013/12/18 08:15:10 update the comment.
Ronghua Wu (Left Chromium) 2013/12/18 21:22:23 Done.
+// Media Stream Video Track.
+// 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 MediaStreamSink {
perkj_chrome 2013/12/18 08:15:10 Should this inherit from MediaStreamSourceExtraDat
Jói 2013/12/18 13:47:07 I agree we might want to hold off on inheriting fr
Ronghua Wu (Left Chromium) 2013/12/18 21:22:23 Ok. Inheriting from MediaStreamSourceExtraData ins
+ public:
+ bool Register(MediaStreamVideoSink* track,
perkj_chrome 2013/12/18 08:15:10 One thing that came up yesterday was applyConstrai
perkj_chrome 2013/12/18 08:15:10 Comment on thread requirements please. Here and th
Jói 2013/12/18 13:47:07 If MediaStreamVideoTrack has some methods that a s
Ronghua Wu (Left Chromium) 2013/12/18 21:22:23 It's at the beginning of the class.
Ronghua Wu (Left Chromium) 2013/12/18 21:22:23 Ok. I thought we are not suppose to reopen the cam
+ const blink::WebMediaConstraints& constrains);
+ bool Unregister(MediaStreamVideoSink* track);
+
+ protected:
+ // An implementation of MediaStreamVideoSource should call OnVideoFrame when
+ // it is ready to send a frame to video tracks.
+ virtual void OnVideoFrame(const scoped_refptr<media::VideoFrame>& frame);
+ virtual ~MediaStreamVideoSource();
+};
+
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_VIDEO_SOURCE_H_
Property changes on: content/public/renderer/media_stream_video_source.h
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698