blob: e895c4ee58c9c9687e4d18ca77cba47fc95ddf6e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
// Copyright (c) 2011 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 WEBKIT_MEDIA_MEDIA_STREAM_CLIENT_H_
#define WEBKIT_MEDIA_MEDIA_STREAM_CLIENT_H_
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "webkit/media/video_frame_provider.h"
class GURL;
namespace base {
class MessageLoopProxy;
}
namespace media {
class VideoDecoder;
}
namespace webkit_media {
class MediaStreamAudioRenderer;
// Define an interface for media stream client to get some information about
// the media stream.
class MediaStreamClient {
public:
// Check if the |url| is derived from a media stream object.
virtual bool IsMediaStream(const GURL& url) = 0;
virtual scoped_refptr<VideoFrameProvider> GetVideoFrameProvider(
const GURL& url,
const base::Closure& error_cb,
const VideoFrameProvider::RepaintCB& repaint_cb) = 0;
virtual scoped_refptr<media::VideoDecoder> GetVideoDecoder(
const GURL& url,
const scoped_refptr<base::MessageLoopProxy>& message_loop) = 0;
virtual scoped_refptr<MediaStreamAudioRenderer> GetAudioRenderer(
const GURL& url) = 0;
protected:
virtual ~MediaStreamClient() {}
};
} // namespace webkit_media
#endif // WEBKIT_MEDIA_MEDIA_STREAM_CLIENT_H_
|