-
Notifications
You must be signed in to change notification settings - Fork 0
/
mediaplayer_params.h
60 lines (48 loc) · 1.79 KB
/
mediaplayer_params.h
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
52
53
54
55
56
57
58
59
60
// Copyright (c) 2017 YuTeh Shen
//
#ifndef CHROMIUM_MEDIA_LIB_MEDIAPLAYER_PARAMS_H_
#define CHROMIUM_MEDIA_LIB_MEDIAPLAYER_PARAMS_H_
#include <memory>
#include "base/memory/ref_counted.h"
#include "base/single_thread_task_runner.h"
#include "media/base/media_log.h"
namespace media {
class VideoRendererSinkClient;
class MediaPlayerParams {
public:
MediaPlayerParams(
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> media_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
scoped_refptr<base::TaskRunner> worker_task_runner,
std::unique_ptr<MediaLog> media_log);
std::unique_ptr<MediaLog> take_media_log() { return std::move(media_log_); }
~MediaPlayerParams();
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner() {
return main_task_runner_;
}
scoped_refptr<base::SingleThreadTaskRunner> media_task_runner() {
return media_task_runner_;
}
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner() {
return io_task_runner_;
}
scoped_refptr<base::TaskRunner> worker_task_runner() {
return worker_task_runner_;
}
void SetVideoRendererSinkClient(VideoRendererSinkClient* client) {
video_renderer_sink_client_ = client;
}
VideoRendererSinkClient* video_renderer_sink_client() {
return video_renderer_sink_client_;
}
private:
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_;
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
scoped_refptr<base::TaskRunner> worker_task_runner_;
std::unique_ptr<MediaLog> media_log_;
VideoRendererSinkClient* video_renderer_sink_client_;
};
} // namespace media
#endif // CHROMIUM_MEDIA_LIB_MEDIAPLAYER_PARAMS_H_