MPD: SharedPipeConsumer Class Reference

MPD 0.20.15

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 () noexcept
void | Consume (gcc_unused const MusicChunk &_chunk)
gcc_pure bool | IsConsumed (const MusicChunk &_chunk) const noexcept
void | ClearTail (gcc_unused const MusicChunk &_chunk) noexcept

## 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

## ◆ Cancel()

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

Definition at line 74 of file SharedPipeConsumer.hxx.

## ◆ ClearTail()

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

Definition at line 90 of file SharedPipeConsumer.hxx.

## ◆ Consume()

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

Definition at line 80 of file SharedPipeConsumer.hxx.

## ◆ Get()

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

## ◆ GetPipe()

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

Definition at line 64 of file SharedPipeConsumer.hxx.

## ◆ Init()

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

Definition at line 59 of file SharedPipeConsumer.hxx.

## ◆ IsConsumed()

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

## ◆ IsInitial()

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