MPD  0.20.6
Public Member Functions | Data Fields
FlacDecoder Struct Reference

#include <FlacCommon.hxx>

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

Public Member Functions

 FlacDecoder (DecoderClient &_client, InputStream &_input_stream)
 
bool Initialize (unsigned sample_rate, unsigned bits_per_sample, unsigned channels, FLAC__uint64 total_frames)
 Wrapper for DecoderClient::Ready(). More...
 
void OnMetadata (const FLAC__StreamMetadata &metadata)
 
FLAC__StreamDecoderWriteStatus OnWrite (const FLAC__Frame &frame, const FLAC__int32 *const buf[], FLAC__uint64 nbytes)
 
FLAC__uint64 GetDeltaPosition (const FLAC__StreamDecoder &sd)
 Calculate the delta (in bytes) between the last frame and the current frame. More...
 
- Public Member Functions inherited from FlacInput
 FlacInput (InputStream &_input_stream, DecoderClient *_client=nullptr)
 
DecoderClientGetClient ()
 
InputStreamGetInputStream ()
 

Data Fields

bool initialized = false
 Has DecoderClient::Ready() been called yet? More...
 
bool unsupported = false
 Does the FLAC file contain an unsupported audio format? More...
 
FlacPcmImport pcm_import
 
FLAC__uint64 position = 0
 End of last frame's position within the stream. More...
 
Tag tag
 

Additional Inherited Members

- Static Public Member Functions inherited from FlacInput
static FLAC__StreamDecoderReadStatus Read (const FLAC__StreamDecoder *flac_decoder, FLAC__byte buffer[], size_t *bytes, void *client_data)
 
static FLAC__StreamDecoderSeekStatus Seek (const FLAC__StreamDecoder *flac_decoder, FLAC__uint64 absolute_byte_offset, void *client_data)
 
static FLAC__StreamDecoderTellStatus Tell (const FLAC__StreamDecoder *flac_decoder, FLAC__uint64 *absolute_byte_offset, void *client_data)
 
static FLAC__StreamDecoderLengthStatus Length (const FLAC__StreamDecoder *flac_decoder, FLAC__uint64 *stream_length, void *client_data)
 
static FLAC__bool Eof (const FLAC__StreamDecoder *flac_decoder, void *client_data)
 
static void Error (const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)
 
- Protected Member Functions inherited from FlacInput
FLAC__StreamDecoderReadStatus Read (FLAC__byte buffer[], size_t *bytes)
 
FLAC__StreamDecoderSeekStatus Seek (FLAC__uint64 absolute_byte_offset)
 
FLAC__StreamDecoderTellStatus Tell (FLAC__uint64 *absolute_byte_offset)
 
FLAC__StreamDecoderLengthStatus Length (FLAC__uint64 *stream_length)
 
FLAC__bool Eof ()
 
void Error (FLAC__StreamDecoderErrorStatus status)
 

Detailed Description

Definition at line 33 of file FlacCommon.hxx.

Constructor & Destructor Documentation

FlacDecoder::FlacDecoder ( DecoderClient _client,
InputStream _input_stream 
)
inline

Definition at line 54 of file FlacCommon.hxx.

Member Function Documentation

FLAC__uint64 FlacDecoder::GetDeltaPosition ( const FLAC__StreamDecoder &  sd)

Calculate the delta (in bytes) between the last frame and the current frame.

bool FlacDecoder::Initialize ( unsigned  sample_rate,
unsigned  bits_per_sample,
unsigned  channels,
FLAC__uint64  total_frames 
)

Wrapper for DecoderClient::Ready().

void FlacDecoder::OnMetadata ( const FLAC__StreamMetadata &  metadata)
FLAC__StreamDecoderWriteStatus FlacDecoder::OnWrite ( const FLAC__Frame &  frame,
const FLAC__int32 *const  buf[],
FLAC__uint64  nbytes 
)

Field Documentation

bool FlacDecoder::initialized = false

Has DecoderClient::Ready() been called yet?

Definition at line 37 of file FlacCommon.hxx.

FlacPcmImport FlacDecoder::pcm_import

Definition at line 44 of file FlacCommon.hxx.

FLAC__uint64 FlacDecoder::position = 0

End of last frame's position within the stream.

This is used for bit rate calculations.

Definition at line 50 of file FlacCommon.hxx.

Tag FlacDecoder::tag

Definition at line 52 of file FlacCommon.hxx.

bool FlacDecoder::unsupported = false

Does the FLAC file contain an unsupported audio format?

Definition at line 42 of file FlacCommon.hxx.


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