MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions
SharedPipeConsumer Class Reference

A utility class which helps with consuming data from a MusicPipe. More...

`#include <SharedPipeConsumer.hxx>`

## Public Member Functions
void | Init (const MusicPipe &_pipe)
const MusicPipe & | GetPipe ()
bool | IsInitial ()
void | Cancel ()
const MusicChunk * | Get ()
void | Consume (gcc_unused const MusicChunk &_chunk)
gcc_pure bool | IsConsumed (const MusicChunk &_chunk) const
void | ClearTail (gcc_unused const MusicChunk &_chunk)

## Detailed Description

A utility class which helps with consuming data from a MusicPipe.

This class is intentionally not thread-safe. Since it is designed to be called from two distinct threads (PlayerThread=feeder and OutputThread=consumer), all methods must be called with a mutex locked to serialize access. Usually, this is AudioOutput::mutex.

Definition at line 39 of file SharedPipeConsumer.hxx.

## Member Function Documentation

void SharedPipeConsumer::Cancel | ( |  | ) |
| inline

Definition at line 74 of file SharedPipeConsumer.hxx.

void SharedPipeConsumer::ClearTail | ( | gcc_unused const MusicChunk & | _chunk | ) |
| inline

Definition at line 90 of file SharedPipeConsumer.hxx.

void SharedPipeConsumer::Consume | ( | gcc_unused const MusicChunk & | _chunk | ) |
| inline

Definition at line 80 of file SharedPipeConsumer.hxx.

const MusicChunk* SharedPipeConsumer::Get | ( |  | ) |

const MusicPipe& SharedPipeConsumer::GetPipe | ( |  | ) |
| inline

Definition at line 64 of file SharedPipeConsumer.hxx.

void SharedPipeConsumer::Init | ( | const MusicPipe & | _pipe | ) |
| inline

Definition at line 59 of file SharedPipeConsumer.hxx.

gcc_pure bool SharedPipeConsumer::IsConsumed | ( | const MusicChunk & | _chunk | ) | const

bool SharedPipeConsumer::IsInitial | ( |  | ) |
| inline

Definition at line 70 of file SharedPipeConsumer.hxx.

The documentation for this class was generated from the following file:

- output/SharedPipeConsumer.hxx