blob: 2fa5ddbdde2e3ef2a569e4c9e235685fc43aaac3 (
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
|
#include "audio_null.h"
static bool audio_null_init(struct camu_audio *audio, str *name)
{
struct camu_audio_null *na = (struct camu_audio_null *)audio;
(void)na;
(void)name;
return true;
}
static void audio_null_pick_format(struct camu_audio *audio, struct camu_resampler_format *fmt)
{
struct camu_audio_null *na = (struct camu_audio_null *)audio;
(void)na;
fmt->req.format = fmt->in.format;
fmt->req.channel_count = fmt->in.channel_count;
#ifdef CAMU_HAVE_FFMPEG
camu_default_channel_layout(&fmt->req.channel_layout, fmt->in.channel_count);
#endif
fmt->req.sample_rate = fmt->in.sample_rate;
}
static bool audio_null_configure_stream(struct camu_audio *audio, void *opaque)
{
struct camu_audio_null *na = (struct camu_audio_null *)audio;
(void)na;
(void)opaque;
return true;
}
static u64 audio_null_get_latency(struct camu_audio *audio)
{
struct camu_audio_null *na = (struct camu_audio_null *)audio;
(void)na;
return 0;
}
static void audio_null_start(struct camu_audio *audio)
{
struct camu_audio_null *na = (struct camu_audio_null *)audio;
(void)na;
}
static void audio_null_stop(struct camu_audio *audio)
{
struct camu_audio_null *na = (struct camu_audio_null *)audio;
(void)na;
}
static void audio_null_free(struct camu_audio **audio)
{
struct camu_audio_null *na = (struct camu_audio_null *)*audio;
(void)na;
*audio = NULL;
}
struct camu_audio_null audio_plugin_null = {
.a = {
.init = audio_null_init,
.pick_format = audio_null_pick_format,
.configure_stream = audio_null_configure_stream,
.get_latency = audio_null_get_latency,
.start = audio_null_start,
.stop = audio_null_stop,
.free = audio_null_free,
.data_callback = NULL,
.userdata = NULL
}
};
|