33#ifndef FLACPP__DECODER_H
34#define FLACPP__DECODER_H
107 inline operator ::FLAC__StreamDecoderState()
const {
return state_; }
108 inline const char *as_cstring()
const { return ::FLAC__StreamDecoderStateString[state_]; }
109 inline const char *resolved_as_cstring(
const Stream &decoder)
const { return ::FLAC__stream_decoder_get_resolved_state_string(decoder.decoder_); }
122 inline operator bool()
const {
return is_valid(); }
149 virtual ::FLAC__StreamDecoderInitStatus
init();
150 virtual ::FLAC__StreamDecoderInitStatus
init_ogg();
168 virtual ::FLAC__StreamDecoderReadStatus
read_callback(FLAC__byte buffer[],
size_t *bytes) = 0;
171 virtual ::FLAC__StreamDecoderSeekStatus
seek_callback(FLAC__uint64 absolute_byte_offset);
174 virtual ::FLAC__StreamDecoderTellStatus
tell_callback(FLAC__uint64 *absolute_byte_offset);
177 virtual ::FLAC__StreamDecoderLengthStatus
length_callback(FLAC__uint64 *stream_length);
183 virtual ::FLAC__StreamDecoderWriteStatus
write_callback(const ::FLAC__Frame *frame,
const FLAC__int32 *
const buffer[]) = 0;
191#if (defined __BORLANDC__) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96))) || (defined __SUNPRO_CC)
197 static ::FLAC__StreamDecoderReadStatus read_callback_(const ::FLAC__StreamDecoder *decoder, FLAC__byte buffer[],
size_t *bytes,
void *client_data);
198 static ::FLAC__StreamDecoderSeekStatus seek_callback_(const ::FLAC__StreamDecoder *decoder, FLAC__uint64 absolute_byte_offset,
void *client_data);
199 static ::FLAC__StreamDecoderTellStatus tell_callback_(const ::FLAC__StreamDecoder *decoder, FLAC__uint64 *absolute_byte_offset,
void *client_data);
200 static ::FLAC__StreamDecoderLengthStatus length_callback_(const ::FLAC__StreamDecoder *decoder, FLAC__uint64 *stream_length,
void *client_data);
201 static FLAC__bool eof_callback_(const ::FLAC__StreamDecoder *decoder,
void *client_data);
202 static ::FLAC__StreamDecoderWriteStatus write_callback_(const ::FLAC__StreamDecoder *decoder, const ::FLAC__Frame *frame,
const FLAC__int32 *
const buffer[],
void *client_data);
203 static void metadata_callback_(const ::FLAC__StreamDecoder *decoder, const ::FLAC__StreamMetadata *metadata,
void *client_data);
208 void operator=(
const Stream &);
236 virtual ::FLAC__StreamDecoderInitStatus
init(FILE *file);
237 virtual ::FLAC__StreamDecoderInitStatus
init(
const char *filename);
238 virtual ::FLAC__StreamDecoderInitStatus
init(
const std::string &filename);
239 using Stream::init_ogg;
240 virtual ::FLAC__StreamDecoderInitStatus
init_ogg(FILE *file);
241 virtual ::FLAC__StreamDecoderInitStatus
init_ogg(
const char *filename);
242 virtual ::FLAC__StreamDecoderInitStatus
init_ogg(
const std::string &filename);
245 virtual ::FLAC__StreamDecoderReadStatus
read_callback(FLAC__byte buffer[],
size_t *bytes);
249 void operator=(
const File &);
This module contains #defines and symbols for exporting function calls, and providing version informa...
This class wraps the FLAC__StreamDecoder. If you are not decoding from a file, you may need to use FL...
Definition decoder.h:230
virtual ::FLAC__StreamDecoderInitStatus init(const std::string &filename)
See FLAC__stream_decoder_init_file()
virtual ::FLAC__StreamDecoderInitStatus init_ogg(const char *filename)
See FLAC__stream_decoder_init_ogg_file()
virtual ::FLAC__StreamDecoderInitStatus init(const char *filename)
See FLAC__stream_decoder_init_file()
virtual ::FLAC__StreamDecoderReadStatus read_callback(FLAC__byte buffer[], size_t *bytes)
see FLAC__StreamDecoderReadCallback
virtual ::FLAC__StreamDecoderInitStatus init(FILE *file)
See FLAC__stream_decoder_init_FILE()
virtual ::FLAC__StreamDecoderInitStatus init_ogg(FILE *file)
See FLAC__stream_decoder_init_ogg_FILE()
virtual ::FLAC__StreamDecoderInitStatus init_ogg(const std::string &filename)
See FLAC__stream_decoder_init_ogg_file()
This class wraps the FLAC__StreamDecoder. If you are decoding from a file, FLAC::Decoder::File may be...
Definition decoder.h:100
virtual ::FLAC__StreamDecoderTellStatus tell_callback(FLAC__uint64 *absolute_byte_offset)
see FLAC__StreamDecoderTellCallback
virtual bool finish()
See FLAC__stream_decoder_finish()
virtual bool is_valid() const
virtual bool skip_single_link()
See FLAC__stream_decoder_skip_single_link()
virtual void error_callback(::FLAC__StreamDecoderErrorStatus status)=0
see FLAC__StreamDecoderErrorCallback
virtual uint32_t get_sample_rate() const
See FLAC__stream_decoder_get_sample_rate()
virtual void metadata_callback(const ::FLAC__StreamMetadata *metadata)
see FLAC__StreamDecoderMetadataCallback
virtual bool set_metadata_respond_all()
See FLAC__stream_decoder_set_metadata_respond_all()
virtual bool skip_single_frame()
See FLAC__stream_decoder_skip_single_frame()
virtual ::FLAC__StreamDecoderInitStatus init()
Seek FLAC__stream_decoder_init_stream()
virtual bool get_decode_position(FLAC__uint64 *position) const
See FLAC__stream_decoder_get_decode_position()
virtual bool set_decode_chained_stream(bool value)
See FLAC__stream_decoder_set_decode_chained_stream()
virtual bool get_md5_checking() const
See FLAC__stream_decoder_get_md5_checking()
virtual uint32_t get_bits_per_sample() const
See FLAC__stream_decoder_get_bits_per_sample()
virtual uint32_t get_channels() const
See FLAC__stream_decoder_get_channels()
virtual int32_t get_link_lengths(FLAC__uint64 **link_lengths)
See FLAC__stream_decoder_get_link_lengths()
virtual ::FLAC__StreamDecoderLengthStatus length_callback(FLAC__uint64 *stream_length)
see FLAC__StreamDecoderLengthCallback
virtual bool process_until_end_of_link()
See FLAC__stream_decoder_process_until_end_of_link()
virtual uint32_t get_blocksize() const
See FLAC__stream_decoder_get_blocksize()
virtual ::FLAC__ChannelAssignment get_channel_assignment() const
See FLAC__stream_decoder_get_channel_assignment()
virtual bool reset()
See FLAC__stream_decoder_reset()
virtual bool set_md5_checking(bool value)
See FLAC__stream_decoder_set_md5_checking()
virtual bool set_metadata_ignore_all()
See FLAC__stream_decoder_set_metadata_ignore_all()
virtual FLAC__uint64 find_total_samples()
See FLAC__stream_decoder_find_total_samples()
virtual bool set_metadata_respond(::FLAC__MetadataType type)
See FLAC__stream_decoder_set_metadata_respond()
virtual bool set_metadata_respond_application(const FLAC__byte id[4])
See FLAC__stream_decoder_set_metadata_respond_application()
virtual bool flush()
See FLAC__stream_decoder_flush()
virtual bool finish_link()
See FLAC__stream_decoder_finish_link()
virtual bool set_ogg_serial_number(long value)
See FLAC__stream_decoder_set_ogg_serial_number()
virtual bool process_until_end_of_metadata()
See FLAC__stream_decoder_process_until_end_of_metadata()
virtual bool process_single()
See FLAC__stream_decoder_process_single()
virtual bool get_decode_chained_stream() const
See FLAC__stream_decoder_get_decode_chained_stream()
State get_state() const
See FLAC__stream_decoder_get_state()
virtual bool eof_callback()
see FLAC__StreamDecoderEofCallback
virtual bool seek_absolute(FLAC__uint64 sample)
See FLAC__stream_decoder_seek_absolute()
virtual FLAC__uint64 get_total_samples() const
See FLAC__stream_decoder_get_total_samples()
virtual bool set_metadata_ignore_application(const FLAC__byte id[4])
See FLAC__stream_decoder_set_metadata_ignore_application()
virtual ::FLAC__StreamDecoderInitStatus init_ogg()
Seek FLAC__stream_decoder_init_ogg_stream()
virtual bool set_metadata_ignore(::FLAC__MetadataType type)
See FLAC__stream_decoder_set_metadata_ignore()
virtual ::FLAC__StreamDecoderWriteStatus write_callback(const ::FLAC__Frame *frame, const FLAC__int32 *const buffer[])=0
see FLAC__StreamDecoderWriteCallback
virtual ::FLAC__StreamDecoderSeekStatus seek_callback(FLAC__uint64 absolute_byte_offset)
see FLAC__StreamDecoderSeekCallback
virtual ::FLAC__StreamDecoderReadStatus read_callback(FLAC__byte buffer[], size_t *bytes)=0
see FLAC__StreamDecoderReadCallback
virtual bool process_until_end_of_stream()
See FLAC__stream_decoder_process_until_end_of_stream()
FLAC__StreamDecoderErrorStatus
Definition stream_decoder.h:444
FLAC__StreamDecoderState
Definition stream_decoder.h:202
#define FLACPP_API
Definition export.h:88
This module contains the functions which implement the stream decoder.
Definition stream_decoder.h:495