aboutsummaryrefslogtreecommitdiffstats
path: root/src/pipe.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-02 17:01:00 +0100
committerMax Kellermann <max@duempel.org>2008-11-02 17:01:00 +0100
commitc7a374bdcbe85a794b047c638e57b9358d2d095b (patch)
tree9fa015038bc31bca343e2b09a669040ba60b949d /src/pipe.h
parentfcc11bc9d85854f9b0dab74dd0ce7f76c412f4a1 (diff)
downloadmpd-c7a374bdcbe85a794b047c638e57b9358d2d095b.tar.gz
mpd-c7a374bdcbe85a794b047c638e57b9358d2d095b.tar.xz
mpd-c7a374bdcbe85a794b047c638e57b9358d2d095b.zip
music_pipe: add tag pointer to the music_chunk struct
Each music chunk can now carry a tag object. Decoder plugins which support it (e.g. oggvorbis) may use this to inject decoded tags into their output.
Diffstat (limited to '')
-rw-r--r--src/pipe.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/pipe.h b/src/pipe.h
index 7d2912197..f65e12d49 100644
--- a/src/pipe.h
+++ b/src/pipe.h
@@ -42,6 +42,14 @@ struct music_chunk {
/** the time stamp within the song */
float times;
+ /**
+ * An optional tag associated with this chunk (and the
+ * following chunks); appears at song boundaries. The tag
+ * object is owned by this chunk, and must be freed when this
+ * chunk is deinitialized in music_chunk_free()
+ */
+ struct tag *tag;
+
/** the data (probably PCM) */
char data[CHUNK_SIZE];
};
@@ -148,6 +156,12 @@ size_t music_pipe_append(const void *data, size_t datalen,
const struct audio_format *audio_format,
float data_time, uint16_t bit_rate);
+/**
+ * Send a tag. This is usually called when a new song within a stream
+ * begins.
+ */
+bool music_pipe_tag(const struct tag *tag);
+
void music_pipe_skip(unsigned num);
#endif