From bad350bc18ab81661253bf42245b9e3fa175d026 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 25 Dec 2009 19:47:33 +0100 Subject: decoder_api: added function decoder_timestamp() Remove the data_time parameter from decoder_data(). This patch eliminates the timestamp counting in most decoder plugins, because the MPD core will do it automatically by default. --- src/decoder_api.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/decoder_api.h') diff --git a/src/decoder_api.h b/src/decoder_api.h index 81f75623..9df6bed1 100644 --- a/src/decoder_api.h +++ b/src/decoder_api.h @@ -114,6 +114,15 @@ size_t decoder_read(struct decoder *decoder, struct input_stream *is, void *buffer, size_t length); +/** + * Sets the time stamp for the next data chunk [seconds]. The MPD + * core automatically counts it up, and a decoder plugin only needs to + * use this function if it thinks that adding to the time stamp based + * on the buffer size won't work. + */ +void +decoder_timestamp(struct decoder *decoder, double t); + /** * This function is called by the decoder plugin when it has * successfully decoded block of input data. @@ -129,7 +138,7 @@ decoder_read(struct decoder *decoder, struct input_stream *is, enum decoder_command decoder_data(struct decoder *decoder, struct input_stream *is, const void *data, size_t length, - float data_time, uint16_t bitRate, + uint16_t kbit_rate, struct replay_gain_info *replay_gain_info); /** -- cgit v1.2.3