src/pipe.h File Reference

#include <stdbool.h>

Go to the source code of this file.

Functions

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.
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.
unsigned music_pipe_size (const struct music_pipe *mp)
 Returns the number of chunks currently in this pipe.

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.

void music_pipe_free ( struct music_pipe *  mp  ) 

Frees the object.

It must be empty now.

struct music_pipe* music_pipe_new ( void   )  [read]

Creates a new music_pipe object.

It is empty.

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.

unsigned music_pipe_size ( const struct music_pipe *  mp  ) 

Returns the number of chunks currently in this pipe.

Generated on Sun May 2 21:28:32 2010 for MPD by  doxygen 1.6.3