Chromium Code Reviews| Index: content/renderer/media/media_stream_video_source.h |
| =================================================================== |
| --- content/renderer/media/media_stream_video_source.h (revision 0) |
| +++ content/renderer/media/media_stream_video_source.h (revision 0) |
| @@ -0,0 +1,42 @@ |
| +// 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_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ |
| +#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 "third_party/WebKit/public/platform/WebMediaConstraints.h" |
| +#include "third_party/WebKit/public/platform/WebMediaStreamTrack.h" |
| + |
| +namespace media { |
| +class VideoFrame; |
| +} |
| + |
| +namespace content { |
| + |
| +// MediaStreamVideoSource is an interface used for sending video frames to a |
| +// MediaStreamVideoTrack. |
| +// 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: |
| + void AddTrack(const blink::WebMediaStreamTrack& track, |
| + const blink::WebMediaConstraints& constrains); |
| + |
| + void RemoveTrack(const blink::WebMediaStreamTrack& track); |
| + |
| + // Delivers |frame| to registered tracks according to their constraints. |
| + virtual void PutVideoFrame(const scoped_refptr<media::VideoFrame>& frame); |
| + |
| + virtual ~MediaStreamVideoSource(); |
| +}; |
| + |
| + |
|
Jói
2013/12/19 12:06:23
nit: Just one blank line.
Ronghua Wu (Left Chromium)
2013/12/19 20:04:16
Done.
|
| +} // namespace content |
| + |
| +#endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ |
| Property changes on: content/renderer/media/media_stream_video_source.h |
| ___________________________________________________________________ |
| Added: svn:eol-style |
| + LF |