aboutsummaryrefslogtreecommitdiffstats
path: root/src/pipe.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-07 19:56:31 +0100
committerMax Kellermann <max@duempel.org>2009-03-07 19:56:31 +0100
commit39d352195608f0f5ffa9f3762dbdebf4e44bccdc (patch)
treea72aefedc2b9159fe55ce17878ca3f4c53e9c761 /src/pipe.c
parentb13cd03f756db4afe3fd719e551801cd632a596b (diff)
downloadmpd-39d352195608f0f5ffa9f3762dbdebf4e44bccdc.tar.gz
mpd-39d352195608f0f5ffa9f3762dbdebf4e44bccdc.tar.xz
mpd-39d352195608f0f5ffa9f3762dbdebf4e44bccdc.zip
music_pipe: added music_pipe_peek()
music_pipe_peek() is similar to music_pipe_shift(), but doesn't remove the chunk. This allows it to be used with a "const" music_pipe.
Diffstat (limited to 'src/pipe.c')
-rw-r--r--src/pipe.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pipe.c b/src/pipe.c
index d02a00a04..320c5c3a3 100644
--- a/src/pipe.c
+++ b/src/pipe.c
@@ -61,6 +61,12 @@ music_pipe_free(struct music_pipe *mp)
g_free(mp);
}
+const struct music_chunk *
+music_pipe_peek(const struct music_pipe *mp)
+{
+ return mp->head;
+}
+
struct music_chunk *
music_pipe_shift(struct music_pipe *mp)
{