strtok() is recursive by default on win32.
[mpd-mk.git] / src / decoder_internal.h
blob9e7e2037aa82e0d987fa769e429688b00e886577
1 /*
2 * Copyright (C) 2003-2010 The Music Player Daemon Project
3 * http://www.musicpd.org
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.
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.
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.
20 #ifndef MPD_DECODER_INTERNAL_H
21 #define MPD_DECODER_INTERNAL_H
23 #include "decoder_command.h"
24 #include "pcm_convert.h"
25 #include "replay_gain_info.h"
27 struct input_stream;
29 struct decoder {
30 struct decoder_control *dc;
32 struct pcm_convert_state conv_state;
34 /**
35 * The time stamp of the next data chunk, in seconds.
37 double timestamp;
39 bool seeking;
41 /**
42 * The tag from the song object. This is only used for local
43 * files, because we expect the stream server to send us a new
44 * tag each time we play it.
46 struct tag *song_tag;
48 /** the last tag received from the stream */
49 struct tag *stream_tag;
51 /** the last tag received from the decoder plugin */
52 struct tag *decoder_tag;
54 /** the chunk currently being written to */
55 struct music_chunk *chunk;
57 struct replay_gain_info replay_gain_info;
59 /**
60 * A positive serial number for checking if replay gain info
61 * has changed since the last check.
63 unsigned replay_gain_serial;
66 /**
67 * Returns the current chunk the decoder writes to, or allocates a new
68 * chunk if there is none.
70 * @return the chunk, or NULL if we have received a decoder command
72 struct music_chunk *
73 decoder_get_chunk(struct decoder *decoder, struct input_stream *is);
75 /**
76 * Flushes the current chunk.
78 void
79 decoder_flush_chunk(struct decoder *decoder);
81 #endif