MPD
decoder_api.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2003-2010 The Music Player Daemon Project
3  * http://www.musicpd.org
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
27 #ifndef MPD_DECODER_API_H
28 #define MPD_DECODER_API_H
29 
30 #include "check.h"
31 #include "decoder_command.h"
32 #include "decoder_plugin.h"
33 #include "input_stream.h"
34 #include "replay_gain_info.h"
35 #include "tag.h"
36 #include "audio_format.h"
37 #include "conf.h"
38 
39 #include <stdbool.h>
40 
51 void
53  const struct audio_format *audio_format,
54  bool seekable, float total_time);
55 
63 enum decoder_command
65 
73 void
75 
82 double
84 
91 void
93 
104 size_t
105 decoder_read(struct decoder *decoder, struct input_stream *is,
106  void *buffer, size_t length);
107 
114 void
115 decoder_timestamp(struct decoder *decoder, double t);
116 
129 enum decoder_command
130 decoder_data(struct decoder *decoder, struct input_stream *is,
131  const void *data, size_t length,
132  uint16_t kbit_rate);
133 
145 enum decoder_command
146 decoder_tag(struct decoder *decoder, struct input_stream *is,
147  const struct tag *tag);
148 
157 float
159  const struct replay_gain_info *replay_gain_info);
160 
169 void
170 decoder_mixramp(struct decoder *decoder, float replay_gain_db,
171  char *mixramp_start, char *mixramp_end);
172 
173 #endif