MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions | Protected Attributes
OggEncoder Class Reference

An abstract base class which contains code common to all encoders with Ogg container output. More...

`#include <OggEncoder.hxx>`

Inheritance diagram for OggEncoder:
[legend]
Collaboration diagram for OggEncoder:
[legend]

## Public Member Functions
| OggEncoder (bool _implements_tag)
void | Flush () final
| Flushes an encoder object, make everything which might currently be buffered available by Read(). More...
size_t | Read (void *dest, size_t length) override
| Reads encoded data from the encoder. More...
Public Member Functions inherited from Encoder
| Encoder (bool _implements_tag)
virtual | ~Encoder ()
bool | ImplementsTag () const
virtual void | End ()
| Ends the stream: flushes the encoder object, generate an end-of-stream marker (if applicable), make everything which might currently be buffered available by encoder_read(). More...
virtual void | PreTag ()
| Prepare for sending a tag to the encoder. More...
virtual void | SendTag (gcc_unused const Tag &tag)
| Sends a tag to the encoder. More...
virtual void | Write (const void *data, size_t length)=0
| Writes raw PCM data to the encoder. More...

## Protected Attributes
OggStreamState | stream

## Detailed Description

An abstract base class which contains code common to all encoders with Ogg container output.

Definition at line 35 of file OggEncoder.hxx.

## Constructor & Destructor Documentation

OggEncoder::OggEncoder | ( | bool | _implements_tag | ) |
| inline

Definition at line 44 of file OggEncoder.hxx.

## Member Function Documentation

void OggEncoder::Flush | ( |  | ) |
| inline final virtual

Flushes an encoder object, make everything which might currently be buffered available by Read().

Throws #std::runtime_error on error.

Reimplemented from Encoder.

Definition at line 50 of file OggEncoder.hxx.

size_t OggEncoder::Read | ( | void * | dest,
|  | size_t | length
| ) |  |
| inline override virtual

Reads encoded data from the encoder.

Call this repeatedly until no more data is returned.

Parameters

  dest | the destination buffer to copy to
  length | the maximum length of the destination buffer

Returns
  the number of bytes written to #dest

Implements Encoder.

Definition at line 54 of file OggEncoder.hxx.

## Field Documentation

OggStreamState OggEncoder::stream
| protected

Definition at line 41 of file OggEncoder.hxx.

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

- encoder/plugins/OggEncoder.hxx