src/pipe.h File Reference

#include <glib.h>
#include <stdbool.h>

Go to the source code of this file.

Functions

G_GNUC_MALLOC struct music_pipe * music_pipe_new (void)
 Creates a new music_pipe object.
void music_pipe_free (struct music_pipe *mp)
 Frees the object.
bool music_pipe_check_format (const struct music_pipe *pipe, const struct audio_format *audio_format)
 Checks if the audio format if the chunk is equal to the specified audio_format.
bool music_pipe_contains (const struct music_pipe *mp, const struct music_chunk *chunk)
 Checks if the specified chunk is enqueued in the music pipe.
G_GNUC_PURE struct music_chunkmusic_pipe_peek (const struct music_pipe *mp)
 Returns the first music_chunk from the pipe.
struct music_chunkmusic_pipe_shift (struct music_pipe *mp)
 Removes the first chunk from the head, and returns it.
void music_pipe_clear (struct music_pipe *mp, struct music_buffer *buffer)
 Clears the whole pipe and returns the chunks to the buffer.
void music_pipe_push (struct music_pipe *mp, struct music_chunk *chunk)
 Pushes a chunk to the tail of the pipe.
G_GNUC_PURE unsigned music_pipe_size (const struct music_pipe *mp)
 Returns the number of chunks currently in this pipe.
static G_GNUC_PURE bool music_pipe_empty (const struct music_pipe *mp)

Function Documentation

bool music_pipe_check_format ( const struct music_pipe *  pipe,
const struct audio_format audio_format 
)

Checks if the audio format if the chunk is equal to the specified audio_format.

void music_pipe_clear ( struct music_pipe *  mp,
struct music_buffer *  buffer 
)

Clears the whole pipe and returns the chunks to the buffer.

Parameters:
buffer the buffer object to return the chunks to
bool music_pipe_contains ( const struct music_pipe *  mp,
const struct music_chunk chunk 
)

Checks if the specified chunk is enqueued in the music pipe.

static G_GNUC_PURE bool music_pipe_empty ( const struct music_pipe *  mp  )  [inline, static]

Definition at line 108 of file pipe.h.

void music_pipe_free ( struct music_pipe *  mp  ) 

Frees the object.

It must be empty now.

G_GNUC_MALLOC struct music_pipe* music_pipe_new ( void   )  [read]

Creates a new music_pipe object.

It is empty.

G_GNUC_PURE struct music_chunk* music_pipe_peek ( const struct music_pipe *  mp  )  [read]

Returns the first music_chunk from the pipe.

Returns NULL if the pipe is empty.

void music_pipe_push ( struct music_pipe *  mp,
struct music_chunk chunk 
)

Pushes a chunk to the tail of the pipe.

struct music_chunk* music_pipe_shift ( struct music_pipe *  mp  )  [read]

Removes the first chunk from the head, and returns it.

G_GNUC_PURE unsigned music_pipe_size ( const struct music_pipe *  mp  ) 

Returns the number of chunks currently in this pipe.


Generated on 17 Jul 2013 for MPD by  doxygen 1.6.1