FLAC: FLAC::Encoder::Stream Class Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

# FLAC::Encoder::Stream Class Reference
[FLAC++/encoder.h: encoder classes]

`#include <encoder.h>`

Inheritance diagram for FLAC::Encoder::Stream:

List of all members.

## Detailed Description

This class wraps the FLAC__StreamEncoder. If you are encoding to a file, FLAC::Encoder::File may be more convenient.

The usage of this class is similar to FLAC__StreamEncoder, except instead of providing callbacks to FLAC__stream_encoder_init*_stream(), you will inherit from this class and override the virtual callback functions with your own implementations, then call init() or init_ogg(). The rest of the calls work the same as in the C layer.

Only the write callback is mandatory. The others are optional; this class provides default implementations that do nothing. In order for some STREAMINFO and SEEKTABLE data to be written properly, you must overide seek_callback() and tell_callback(); see FLAC__stream_encoder_init_stream() as to why.

## Public Member Functions
virtual bool | is_valid () const
| operator bool () const
virtual bool | set_ogg_serial_number (long value)
virtual bool | set_verify (bool value)
virtual bool | set_streamable_subset (bool value)
virtual bool | set_channels (unsigned value)
virtual bool | set_bits_per_sample (unsigned value)
virtual bool | set_sample_rate (unsigned value)
virtual bool | set_compression_level (unsigned value)
virtual bool | set_blocksize (unsigned value)
virtual bool | set_do_mid_side_stereo (bool value)
virtual bool | set_loose_mid_side_stereo (bool value)
virtual bool | set_apodization (const char *specification)
virtual bool | set_max_lpc_order (unsigned value)
virtual bool | set_qlp_coeff_precision (unsigned value)
virtual bool | set_do_qlp_coeff_prec_search (bool value)
virtual bool | set_do_escape_coding (bool value)
virtual bool | set_do_exhaustive_model_search (bool value)
virtual bool | set_min_residual_partition_order (unsigned value)
virtual bool | set_max_residual_partition_order (unsigned value)
virtual bool | set_rice_parameter_search_dist (unsigned value)
virtual bool | set_total_samples_estimate (FLAC__uint64 value)
virtual bool | set_metadata (::FLAC__StreamMetadata **metadata, unsigned num_blocks)
virtual bool | set_metadata (FLAC::Metadata::Prototype **metadata, unsigned num_blocks)
State | get_state () const
virtual Decoder::Stream::State | get_verify_decoder_state () const
virtual void | get_verify_decoder_error_stats (FLAC__uint64 *absolute_sample, unsigned *frame_number, unsigned *channel, unsigned *sample, FLAC__int32 *expected, FLAC__int32 *got)
virtual bool | get_verify () const
virtual bool | get_streamable_subset () const
virtual bool | get_do_mid_side_stereo () const
virtual bool | get_loose_mid_side_stereo () const
virtual unsigned | get_channels () const
virtual unsigned | get_bits_per_sample () const
virtual unsigned | get_sample_rate () const
virtual unsigned | get_blocksize () const
virtual unsigned | get_max_lpc_order () const
virtual unsigned | get_qlp_coeff_precision () const
virtual bool | get_do_qlp_coeff_prec_search () const
virtual bool | get_do_escape_coding () const
virtual bool | get_do_exhaustive_model_search () const
virtual unsigned | get_min_residual_partition_order () const
virtual unsigned | get_max_residual_partition_order () const
virtual unsigned | get_rice_parameter_search_dist () const
virtual FLAC__uint64 | get_total_samples_estimate () const
virtual ::FLAC__StreamEncoderInitStatus | init ()
virtual ::FLAC__StreamEncoderInitStatus | init_ogg ()
virtual bool | finish ()
virtual bool | process (const FLAC__int32 *const buffer[], unsigned samples)
virtual bool | process_interleaved (const FLAC__int32 buffer[], unsigned samples)
## Protected Member Functions
virtual ::FLAC__StreamEncoderReadStatus | read_callback (FLAC__byte buffer[], size_t *bytes)
virtual ::FLAC__StreamEncoderWriteStatus | write_callback (const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame)=0
virtual ::FLAC__StreamEncoderSeekStatus | seek_callback (FLAC__uint64 absolute_byte_offset)
virtual ::FLAC__StreamEncoderTellStatus | tell_callback (FLAC__uint64 *absolute_byte_offset)
virtual void | metadata_callback (const ::FLAC__StreamMetadata *metadata)
## Static Protected Member Functions
::FLAC__StreamEncoderReadStatus | read_callback_ (const ::FLAC__StreamEncoder *encoder, FLAC__byte buffer[], size_t *bytes, void *client_data)
::FLAC__StreamEncoderWriteStatus | write_callback_ (const ::FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame, void *client_data)
::FLAC__StreamEncoderSeekStatus | seek_callback_ (const FLAC__StreamEncoder *encoder, FLAC__uint64 absolute_byte_offset, void *client_data)
::FLAC__StreamEncoderTellStatus | tell_callback_ (const FLAC__StreamEncoder *encoder, FLAC__uint64 *absolute_byte_offset, void *client_data)
static void | metadata_callback_ (const ::FLAC__StreamEncoder *encoder, const ::FLAC__StreamMetadata *metadata, void *client_data)
## Protected Attributes
::FLAC__StreamEncoder * | encoder_
## Classes
class | State

## Member Function Documentation

virtual bool FLAC::Encoder::Stream::is_valid | ( |  | ) | const`[virtual]`

| Call after construction to check the that the object was created successfully. If not, use get_state() to find out why not.

FLAC::Encoder::Stream::operator bool | ( |  | ) | const`[inline]`

| See is_valid().

virtual bool FLAC::Encoder::Stream::set_ogg_serial_number | ( | long | value | ) | `[virtual]`

| See FLAC__stream_encoder_set_ogg_serial_number().

virtual bool FLAC::Encoder::Stream::set_verify | ( | bool | value | ) | `[virtual]`

| See FLAC__stream_encoder_set_verify().

virtual bool FLAC::Encoder::Stream::set_streamable_subset | ( | bool | value | ) | `[virtual]`

| See FLAC__stream_encoder_set_streamable_subset().

virtual bool FLAC::Encoder::Stream::set_channels | ( | unsigned | value | ) | `[virtual]`

| See FLAC__stream_encoder_set_channels().

virtual bool FLAC::Encoder::Stream::set_bits_per_sample | ( | unsigned | value | ) | `[virtual]`

| See FLAC__stream_encoder_set_bits_per_sample().

virtual bool FLAC::Encoder::Stream::set_sample_rate | ( | unsigned | value | ) | `[virtual]`

| See FLAC__stream_encoder_set_sample_rate().

virtual bool FLAC::Encoder::Stream::set_compression_level | ( | unsigned | value | ) | `[virtual]`

| See FLAC__stream_encoder_set_compression_level().

virtual bool FLAC::Encoder::Stream::set_blocksize | ( | unsigned | value | ) | `[virtual]`

| See FLAC__stream_encoder_set_blocksize().

virtual bool FLAC::Encoder::Stream::set_do_mid_side_stereo | ( | bool | value | ) | `[virtual]`

| See FLAC__stream_encoder_set_do_mid_side_stereo().

virtual bool FLAC::Encoder::Stream::set_loose_mid_side_stereo | ( | bool | value | ) | `[virtual]`

| See FLAC__stream_encoder_set_loose_mid_side_stereo().

virtual bool FLAC::Encoder::Stream::set_apodization | ( | const char * | specification | ) | `[virtual]`

| See FLAC__stream_encoder_set_apodization().

virtual bool FLAC::Encoder::Stream::set_max_lpc_order | ( | unsigned | value | ) | `[virtual]`

| See FLAC__stream_encoder_set_max_lpc_order().

virtual bool FLAC::Encoder::Stream::set_qlp_coeff_precision | ( | unsigned | value | ) | `[virtual]`

| See FLAC__stream_encoder_set_qlp_coeff_precision().

virtual bool FLAC::Encoder::Stream::set_do_qlp_coeff_prec_search | ( | bool | value | ) | `[virtual]`

| See FLAC__stream_encoder_set_do_qlp_coeff_prec_search().

virtual bool FLAC::Encoder::Stream::set_do_escape_coding | ( | bool | value | ) | `[virtual]`

| See FLAC__stream_encoder_set_do_escape_coding().

virtual bool FLAC::Encoder::Stream::set_do_exhaustive_model_search | ( | bool | value | ) | `[virtual]`

| See FLAC__stream_encoder_set_do_exhaustive_model_search().

virtual bool FLAC::Encoder::Stream::set_min_residual_partition_order | ( | unsigned | value | ) | `[virtual]`

| See FLAC__stream_encoder_set_min_residual_partition_order().

virtual bool FLAC::Encoder::Stream::set_max_residual_partition_order | ( | unsigned | value | ) | `[virtual]`

| See FLAC__stream_encoder_set_max_residual_partition_order().

virtual bool FLAC::Encoder::Stream::set_rice_parameter_search_dist | ( | unsigned | value | ) | `[virtual]`

| See FLAC__stream_encoder_set_rice_parameter_search_dist().

virtual bool FLAC::Encoder::Stream::set_total_samples_estimate | ( | FLAC__uint64 | value | ) | `[virtual]`

| See FLAC__stream_encoder_set_total_samples_estimate().

virtual bool FLAC::Encoder::Stream::set_metadata | ( | ::FLAC__StreamMetadata ** | metadata,
|  | unsigned | num_blocks
| ) | `[virtual]`

| See FLAC__stream_encoder_set_metadata().

virtual bool FLAC::Encoder::Stream::set_metadata | ( | FLAC::Metadata::Prototype ** | metadata,
|  | unsigned | num_blocks
| ) | `[virtual]`

| See FLAC__stream_encoder_set_metadata().

State FLAC::Encoder::Stream::get_state | ( |  | ) | const

| See FLAC__stream_encoder_get_state().

virtual Decoder::Stream::State FLAC::Encoder::Stream::get_verify_decoder_state | ( |  | ) | const`[virtual]`

| See FLAC__stream_encoder_get_verify_decoder_state().

virtual void FLAC::Encoder::Stream::get_verify_decoder_error_stats | ( | FLAC__uint64 * | absolute_sample,
|  | unsigned * | frame_number,
|  | unsigned * | channel,
|  | unsigned * | sample,
|  | FLAC__int32 * | expected,
|  | FLAC__int32 * | got
| ) | `[virtual]`

| See FLAC__stream_encoder_get_verify_decoder_error_stats().

virtual bool FLAC::Encoder::Stream::get_verify | ( |  | ) | const`[virtual]`

| See FLAC__stream_encoder_get_verify().

virtual bool FLAC::Encoder::Stream::get_streamable_subset | ( |  | ) | const`[virtual]`

| See FLAC__stream_encoder_get_streamable_subset().

virtual bool FLAC::Encoder::Stream::get_do_mid_side_stereo | ( |  | ) | const`[virtual]`

| See FLAC__stream_encoder_get_do_mid_side_stereo().

virtual bool FLAC::Encoder::Stream::get_loose_mid_side_stereo | ( |  | ) | const`[virtual]`

| See FLAC__stream_encoder_get_loose_mid_side_stereo().

virtual unsigned FLAC::Encoder::Stream::get_channels | ( |  | ) | const`[virtual]`

| See FLAC__stream_encoder_get_channels().

virtual unsigned FLAC::Encoder::Stream::get_bits_per_sample | ( |  | ) | const`[virtual]`

| See FLAC__stream_encoder_get_bits_per_sample().

virtual unsigned FLAC::Encoder::Stream::get_sample_rate | ( |  | ) | const`[virtual]`

| See FLAC__stream_encoder_get_sample_rate().

virtual unsigned FLAC::Encoder::Stream::get_blocksize | ( |  | ) | const`[virtual]`

| See FLAC__stream_encoder_get_blocksize().

virtual unsigned FLAC::Encoder::Stream::get_max_lpc_order | ( |  | ) | const`[virtual]`

| See FLAC__stream_encoder_get_max_lpc_order().

virtual unsigned FLAC::Encoder::Stream::get_qlp_coeff_precision | ( |  | ) | const`[virtual]`

| See FLAC__stream_encoder_get_qlp_coeff_precision().

virtual bool FLAC::Encoder::Stream::get_do_qlp_coeff_prec_search | ( |  | ) | const`[virtual]`

| See FLAC__stream_encoder_get_do_qlp_coeff_prec_search().

virtual bool FLAC::Encoder::Stream::get_do_escape_coding | ( |  | ) | const`[virtual]`

| See FLAC__stream_encoder_get_do_escape_coding().

virtual bool FLAC::Encoder::Stream::get_do_exhaustive_model_search | ( |  | ) | const`[virtual]`

| See FLAC__stream_encoder_get_do_exhaustive_model_search().

virtual unsigned FLAC::Encoder::Stream::get_min_residual_partition_order | ( |  | ) | const`[virtual]`

| See FLAC__stream_encoder_get_min_residual_partition_order().

virtual unsigned FLAC::Encoder::Stream::get_max_residual_partition_order | ( |  | ) | const`[virtual]`

| See FLAC__stream_encoder_get_max_residual_partition_order().

virtual unsigned FLAC::Encoder::Stream::get_rice_parameter_search_dist | ( |  | ) | const`[virtual]`

| See FLAC__stream_encoder_get_rice_parameter_search_dist().

virtual FLAC__uint64 FLAC::Encoder::Stream::get_total_samples_estimate | ( |  | ) | const`[virtual]`

| See FLAC__stream_encoder_get_total_samples_estimate().

virtual ::FLAC__StreamEncoderInitStatus FLAC::Encoder::Stream::init | ( |  | ) |

| See FLAC__stream_encoder_init_stream().

virtual ::FLAC__StreamEncoderInitStatus FLAC::Encoder::Stream::init_ogg | ( |  | ) | `[virtual]`

| See FLAC__stream_encoder_init_ogg_stream().

virtual bool FLAC::Encoder::Stream::finish | ( |  | ) | `[virtual]`

| See FLAC__stream_encoder_finish().

virtual bool FLAC::Encoder::Stream::process | ( | const FLAC__int32 *const | buffer[],
|  | unsigned | samples
| ) | `[virtual]`

| See FLAC__stream_encoder_process().

virtual bool FLAC::Encoder::Stream::process_interleaved | ( | const FLAC__int32 | buffer[],
|  | unsigned | samples
| ) | `[virtual]`

| See FLAC__stream_encoder_process_interleaved().

virtual ::FLAC__StreamEncoderReadStatus FLAC::Encoder::Stream::read_callback | ( | FLAC__byte | buffer[],
|  | size_t * | bytes
| ) | `[protected, virtual]`

| See FLAC__StreamEncoderReadCallback.

virtual ::FLAC__StreamEncoderWriteStatus FLAC::Encoder::Stream::write_callback | ( | const FLAC__byte | buffer[],
|  | size_t | bytes,
|  | unsigned | samples,
|  | unsigned | current_frame
| ) | `[protected, pure virtual]`

| See FLAC__StreamEncoderWriteCallback. Implemented in FLAC::Encoder::File.

virtual ::FLAC__StreamEncoderSeekStatus FLAC::Encoder::Stream::seek_callback | ( | FLAC__uint64 | absolute_byte_offset | ) | `[protected, virtual]`

| See FLAC__StreamEncoderSeekCallback.

virtual ::FLAC__StreamEncoderTellStatus FLAC::Encoder::Stream::tell_callback | ( | FLAC__uint64 * | absolute_byte_offset | ) | `[protected, virtual]`

| See FLAC__StreamEncoderTellCallback.

virtual void FLAC::Encoder::Stream::metadata_callback | ( | const ::FLAC__StreamMetadata * | metadata | ) | `[protected, virtual]`

| See FLAC__StreamEncoderMetadataCallback.

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

- include/FLAC++/encoder.h

Copyright (c) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson |