1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_RENDERER_FACTORY_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_RENDERER_FACTORY_H_
8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h"
10 #include "content/common/content_export.h"
11 #include "content/renderer/media/media_stream_audio_renderer.h"
12 #include "content/renderer/media/video_frame_provider.h"
17 // MediaStreamRendererFactory is used by WebMediaPlayerMS to create audio and
18 // video feeds from a MediaStream provided an URL.
19 // The factory methods are virtual in order for blink layouttests to be able to
21 class CONTENT_EXPORT MediaStreamRendererFactory
{
23 MediaStreamRendererFactory();
24 virtual ~MediaStreamRendererFactory();
26 virtual scoped_refptr
<VideoFrameProvider
> GetVideoFrameProvider(
28 const base::Closure
& error_cb
,
29 const VideoFrameProvider::RepaintCB
& repaint_cb
);
31 virtual scoped_refptr
<MediaStreamAudioRenderer
> GetAudioRenderer(
36 DISALLOW_COPY_AND_ASSIGN(MediaStreamRendererFactory
);
39 } // namespace content
41 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_RENDERER_FACTORY_H_