MPD 0.17~git
|
00001 /* 00002 * Copyright (C) 2003-2011 The Music Player Daemon Project 00003 * http://www.musicpd.org 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License along 00016 * with this program; if not, write to the Free Software Foundation, Inc., 00017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00018 */ 00019 00027 #ifndef MPD_DECODER_API_H 00028 #define MPD_DECODER_API_H 00029 00030 #include "check.h" 00031 #include "decoder_command.h" 00032 #include "decoder_plugin.h" 00033 #include "input_stream.h" 00034 #include "replay_gain_info.h" 00035 #include "tag.h" 00036 #include "audio_format.h" 00037 #include "conf.h" 00038 00039 #include <stdbool.h> 00040 00051 void 00052 decoder_initialized(struct decoder *decoder, 00053 const struct audio_format *audio_format, 00054 bool seekable, float total_time); 00055 00063 enum decoder_command 00064 decoder_get_command(struct decoder *decoder); 00065 00073 void 00074 decoder_command_finished(struct decoder *decoder); 00075 00082 double 00083 decoder_seek_where(struct decoder *decoder); 00084 00091 void 00092 decoder_seek_error(struct decoder *decoder); 00093 00104 size_t 00105 decoder_read(struct decoder *decoder, struct input_stream *is, 00106 void *buffer, size_t length); 00107 00114 void 00115 decoder_timestamp(struct decoder *decoder, double t); 00116 00129 enum decoder_command 00130 decoder_data(struct decoder *decoder, struct input_stream *is, 00131 const void *data, size_t length, 00132 uint16_t kbit_rate); 00133 00145 enum decoder_command 00146 decoder_tag(struct decoder *decoder, struct input_stream *is, 00147 const struct tag *tag); 00148 00157 float 00158 decoder_replay_gain(struct decoder *decoder, 00159 const struct replay_gain_info *replay_gain_info); 00160 00169 void 00170 decoder_mixramp(struct decoder *decoder, float replay_gain_db, 00171 char *mixramp_start, char *mixramp_end); 00172 00173 #endif