blob: ace7d4ec613ae1bf92d8a0bb7bd8e5939244c847 (
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
// 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.
#include "media/base/filters.h"
#include "base/logging.h"
namespace media {
// static
const size_t DataSource::kReadError = static_cast<size_t>(-1);
void ResetAndRunCB(FilterStatusCB* cb, PipelineStatus status) {
DCHECK(!cb->is_null());
FilterStatusCB tmp_cb(*cb);
cb->Reset();
tmp_cb.Run(status);
}
void ResetAndRunCB(base::Closure* cb) {
DCHECK(!cb->is_null());
base::Closure tmp_cb(*cb);
cb->Reset();
tmp_cb.Run();
}
Filter::Filter() : host_(NULL) {}
Filter::~Filter() {}
void Filter::clear_host() {
DCHECK(host_);
host_ = NULL;
}
void Filter::set_host(FilterHost* host) {
DCHECK(host);
DCHECK(!host_);
host_ = host;
}
FilterHost* Filter::host() {
return host_;
}
void Filter::Play(const base::Closure& callback) {
DCHECK(!callback.is_null());
callback.Run();
}
void Filter::Pause(const base::Closure& callback) {
DCHECK(!callback.is_null());
callback.Run();
}
void Filter::Flush(const base::Closure& callback) {
DCHECK(!callback.is_null());
callback.Run();
}
void Filter::Stop(const base::Closure& callback) {
DCHECK(!callback.is_null());
callback.Run();
}
void Filter::SetPlaybackRate(float playback_rate) {}
void Filter::Seek(base::TimeDelta time, const FilterStatusCB& callback) {
DCHECK(!callback.is_null());
callback.Run(PIPELINE_OK);
}
void Filter::OnAudioRendererDisabled() {
}
VideoDecoder::VideoDecoder() {}
VideoDecoder::~VideoDecoder() {}
AudioDecoder::AudioDecoder() {}
AudioDecoder::~AudioDecoder() {}
void AudioDecoder::ConsumeAudioSamples(scoped_refptr<Buffer> buffer) {
consume_audio_samples_callback_.Run(buffer);
}
} // namespace media
|