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_PUBLIC_RENDERER_MEDIA_STREAM_RENDERER_FACTORY_H_
6 #define CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_RENDERER_FACTORY_H_
8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h"
10 #include "content/public/renderer/media_stream_audio_renderer.h"
11 #include "content/public/renderer/video_frame_provider.h"
16 // MediaStreamRendererFactory is used by WebMediaPlayerMS to create audio and
17 // video feeds from a MediaStream provided an URL.
18 // The factory methods are virtual in order for blink layouttests to be able to
20 class MediaStreamRendererFactory
{
22 virtual ~MediaStreamRendererFactory() {}
24 virtual scoped_refptr
<VideoFrameProvider
> GetVideoFrameProvider(
26 const base::Closure
& error_cb
,
27 const VideoFrameProvider::RepaintCB
& repaint_cb
) = 0;
29 virtual scoped_refptr
<MediaStreamAudioRenderer
> GetAudioRenderer(
31 int render_frame_id
) = 0;
34 } // namespace content
36 #endif // CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_RENDERER_FACTORY_H_