#include <decoder.h>
Inheritance diagram for FLAC::Decoder::File:
The usage of this class is similar to FLAC__StreamDecoder, except instead of providing callbacks to FLAC__stream_decoder_init*_FILE() or FLAC__stream_decoder_init*_file(), you will inherit from this class and override the virtual callback functions with your own implementations, then call init() or init_off(). The rest of the calls work the same as in the C layer.
Only the write, and error callbacks from FLAC::Decoder::Stream are mandatory. The others are optional; this class provides full working implementations for all other callbacks and supports seeking.
Public Member Functions | |
virtual ::FLAC__StreamDecoderInitStatus | init (FILE *file) |
virtual ::FLAC__StreamDecoderInitStatus | init (const char *filename) |
virtual ::FLAC__StreamDecoderInitStatus | init (const std::string &filename) |
virtual ::FLAC__StreamDecoderInitStatus | init_ogg (FILE *file) |
virtual ::FLAC__StreamDecoderInitStatus | init_ogg (const char *filename) |
virtual ::FLAC__StreamDecoderInitStatus | init_ogg (const std::string &filename) |
virtual bool | is_valid () const |
operator bool () const | |
virtual bool | set_ogg_serial_number (long value) |
virtual bool | set_md5_checking (bool value) |
virtual bool | set_metadata_respond (::FLAC__MetadataType type) |
virtual bool | set_metadata_respond_application (const FLAC__byte id[4]) |
virtual bool | set_metadata_respond_all () |
virtual bool | set_metadata_ignore (::FLAC__MetadataType type) |
virtual bool | set_metadata_ignore_application (const FLAC__byte id[4]) |
virtual bool | set_metadata_ignore_all () |
State | get_state () const |
virtual bool | get_md5_checking () const |
virtual FLAC__uint64 | get_total_samples () const |
virtual unsigned | get_channels () const |
virtual ::FLAC__ChannelAssignment | get_channel_assignment () const |
virtual unsigned | get_bits_per_sample () const |
virtual unsigned | get_sample_rate () const |
virtual unsigned | get_blocksize () const |
virtual bool | get_decode_position (FLAC__uint64 *position) const |
virtual ::FLAC__StreamDecoderInitStatus | init () |
virtual ::FLAC__StreamDecoderInitStatus | init_ogg () |
virtual bool | finish () |
virtual bool | flush () |
virtual bool | reset () |
virtual bool | process_single () |
virtual bool | process_until_end_of_metadata () |
virtual bool | process_until_end_of_stream () |
virtual bool | skip_single_frame () |
virtual bool | seek_absolute (FLAC__uint64 sample) |
Protected Member Functions | |
virtual ::FLAC__StreamDecoderReadStatus | read_callback (FLAC__byte buffer[], size_t *bytes) |
virtual ::FLAC__StreamDecoderSeekStatus | seek_callback (FLAC__uint64 absolute_byte_offset) |
virtual ::FLAC__StreamDecoderTellStatus | tell_callback (FLAC__uint64 *absolute_byte_offset) |
virtual ::FLAC__StreamDecoderLengthStatus | length_callback (FLAC__uint64 *stream_length) |
virtual bool | eof_callback () |
virtual ::FLAC__StreamDecoderWriteStatus | write_callback (const ::FLAC__Frame *frame, const FLAC__int32 *const buffer[])=0 |
virtual void | metadata_callback (const ::FLAC__StreamMetadata *metadata) |
virtual void | error_callback (::FLAC__StreamDecoderErrorStatus status)=0 |
Static Protected Member Functions | |
::FLAC__StreamDecoderReadStatus | read_callback_ (const ::FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data) |
::FLAC__StreamDecoderSeekStatus | seek_callback_ (const ::FLAC__StreamDecoder *decoder, FLAC__uint64 absolute_byte_offset, void *client_data) |
::FLAC__StreamDecoderTellStatus | tell_callback_ (const ::FLAC__StreamDecoder *decoder, FLAC__uint64 *absolute_byte_offset, void *client_data) |
::FLAC__StreamDecoderLengthStatus | length_callback_ (const ::FLAC__StreamDecoder *decoder, FLAC__uint64 *stream_length, void *client_data) |
static FLAC__bool | eof_callback_ (const ::FLAC__StreamDecoder *decoder, void *client_data) |
::FLAC__StreamDecoderWriteStatus | write_callback_ (const ::FLAC__StreamDecoder *decoder, const ::FLAC__Frame *frame, const FLAC__int32 *const buffer[], void *client_data) |
static void | metadata_callback_ (const ::FLAC__StreamDecoder *decoder, const ::FLAC__StreamMetadata *metadata, void *client_data) |
static void | error_callback_ (const ::FLAC__StreamDecoder *decoder,::FLAC__StreamDecoderErrorStatus status, void *client_data) |
Protected Attributes | |
::FLAC__StreamDecoder * | decoder_ |
|
See FLAC__stream_decoder_init_FILE().
|
|
See FLAC__stream_decoder_init_file().
|
|
See FLAC__stream_decoder_init_file().
|
|
See FLAC__stream_decoder_init_ogg_FILE().
|
|
See FLAC__stream_decoder_init_ogg_file().
|
|
See FLAC__stream_decoder_init_ogg_file().
|
|
see FLAC__StreamDecoderReadCallback
Implements FLAC::Decoder::Stream. |
|
Call after construction to check the that the object was created successfully. If not, use get_state() to find out why not. |
|
See is_valid().
|
|
See FLAC__stream_decoder_set_ogg_serial_number().
|
|
See FLAC__stream_decoder_set_md5_checking().
|
|
See FLAC__stream_decoder_set_metadata_respond().
|
|
See FLAC__stream_decoder_set_metadata_respond_application().
|
|
See FLAC__stream_decoder_set_metadata_respond_all().
|
|
See FLAC__stream_decoder_set_metadata_ignore().
|
|
See FLAC__stream_decoder_set_metadata_ignore_application().
|
|
See FLAC__stream_decoder_set_metadata_ignore_all().
|
|
See FLAC__stream_decoder_get_state().
|
|
See FLAC__stream_decoder_get_md5_checking().
|
|
See FLAC__stream_decoder_get_total_samples().
|
|
See FLAC__stream_decoder_get_channels().
|
|
See FLAC__stream_decoder_get_channel_assignment().
|
|
See FLAC__stream_decoder_get_bits_per_sample().
|
|
See FLAC__stream_decoder_get_sample_rate().
|
|
See FLAC__stream_decoder_get_blocksize().
|
|
See FLAC__stream_decoder_get_decode_position().
|
|
Seek FLAC__stream_decoder_init_stream().
|
|
Seek FLAC__stream_decoder_init_ogg_stream().
|
|
See FLAC__stream_decoder_finish().
|
|
See FLAC__stream_decoder_flush().
|
|
See FLAC__stream_decoder_reset().
|
|
See FLAC__stream_decoder_process_single().
|
|
See FLAC__stream_decoder_process_until_end_of_metadata().
|
|
See FLAC__stream_decoder_process_until_end_of_stream().
|
|
See FLAC__stream_decoder_skip_single_frame().
|
|
See FLAC__stream_decoder_seek_absolute().
|
|
see FLAC__StreamDecoderSeekCallback
|
|
see FLAC__StreamDecoderTellCallback
|
|
see FLAC__StreamDecoderLengthCallback
|
|
see FLAC__StreamDecoderEofCallback
|
|
see FLAC__StreamDecoderWriteCallback
|
|
see FLAC__StreamDecoderMetadataCallback
|
|
see FLAC__StreamDecoderErrorCallback
|