MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- File List
- Globals

Data Structures | Functions
DecoderAPI.hxx File Reference

The MPD Decoder API. More...

`#include "check.h"`
`#include "Client.hxx"`
`#include "input/Ptr.hxx"`
`#include "DecoderCommand.hxx"`
`#include "DecoderPlugin.hxx"`
`#include "ReplayGainInfo.hxx"`
`#include "tag/Tag.hxx"`
`#include "AudioFormat.hxx"`
`#include "MixRampInfo.hxx"`
`#include "config/Block.hxx"`
`#include "Chrono.hxx"`
`#include <stdint.h>`
Include dependency graph for DecoderAPI.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
class | StopDecoder
| Throw an instance of this class to stop decoding the current song (successfully). More...

## Functions
size_t | decoder_read (DecoderClient *decoder, InputStream &is, void *buffer, size_t length)
| Blocking read from the input stream. More...
static size_t | decoder_read (DecoderClient &decoder, InputStream &is, void *buffer, size_t length)
bool | decoder_read_full (DecoderClient *decoder, InputStream &is, void *buffer, size_t size)
| Blocking read from the input stream. More...
bool | decoder_skip (DecoderClient *decoder, InputStream &is, size_t size)
| Skip data on the InputStream. More...

## Detailed Description

The MPD Decoder API.

This is the public API which is used by decoder plugins to communicate with the mpd core.

Definition in file DecoderAPI.hxx.

## Function Documentation

size_t decoder_read | ( | DecoderClient * | decoder,
|  | InputStream & | is,
|  | void * | buffer,
|  | size_t | length
| ) |  |

Blocking read from the input stream.

Parameters

  decoder | the decoder object
  is | the input stream to read from
  buffer | the destination buffer
  length | the maximum number of bytes to read

Returns
  the number of bytes read, or 0 if one of the following occurs: end of file; error; command (like SEEK or STOP).

static size_t decoder_read | ( | DecoderClient & | decoder,
|  | InputStream & | is,
|  | void * | buffer,
|  | size_t | length
| ) |  |
| inline static

Definition at line 72 of file DecoderAPI.hxx.

bool decoder_read_full | ( | DecoderClient * | decoder,
|  | InputStream & | is,
|  | void * | buffer,
|  | size_t | size
| ) |  |

Blocking read from the input stream.

Attempts to fill the buffer completely; there is no partial result.

Returns
  true on success, false on error or command or not enough data

bool decoder_skip | ( | DecoderClient * | decoder,
|  | InputStream & | is,
|  | size_t | size
| ) |  |

Skip data on the InputStream.

Returns
  true on success, false on error or command