00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef MPD_PIPE_H
00021 #define MPD_PIPE_H
00022
00023 #ifndef NDEBUG
00024 #include <stdbool.h>
00025
00026 struct audio_format;
00027 #endif
00028
00029 struct music_chunk;
00030 struct music_buffer;
00031
00036 struct music_pipe;
00037
00041 struct music_pipe *
00042 music_pipe_new(void);
00043
00047 void
00048 music_pipe_free(struct music_pipe *mp);
00049
00050 #ifndef NDEBUG
00051
00056 bool
00057 music_pipe_check_format(const struct music_pipe *pipe,
00058 const struct audio_format *audio_format);
00059
00063 bool
00064 music_pipe_contains(const struct music_pipe *mp,
00065 const struct music_chunk *chunk);
00066
00067 #endif
00068
00073 const struct music_chunk *
00074 music_pipe_peek(const struct music_pipe *mp);
00075
00079 struct music_chunk *
00080 music_pipe_shift(struct music_pipe *mp);
00081
00087 void
00088 music_pipe_clear(struct music_pipe *mp, struct music_buffer *buffer);
00089
00093 void
00094 music_pipe_push(struct music_pipe *mp, struct music_chunk *chunk);
00095
00099 unsigned
00100 music_pipe_size(const struct music_pipe *mp);
00101
00102 #endif