32 #ifndef FLACPP__ENCODER_H
33 #define FLACPP__ENCODER_H
123 virtual bool is_valid()
const;
124 inline operator bool()
const {
return is_valid(); }
127 virtual bool set_ogg_serial_number(
long value);
128 virtual bool set_verify(
bool value);
129 virtual bool set_streamable_subset(
bool value);
130 virtual bool set_channels(
unsigned value);
131 virtual bool set_bits_per_sample(
unsigned value);
132 virtual bool set_sample_rate(
unsigned value);
133 virtual bool set_compression_level(
unsigned value);
134 virtual bool set_blocksize(
unsigned value);
135 virtual bool set_do_mid_side_stereo(
bool value);
136 virtual bool set_loose_mid_side_stereo(
bool value);
137 virtual bool set_apodization(
const char *specification);
138 virtual bool set_max_lpc_order(
unsigned value);
139 virtual bool set_qlp_coeff_precision(
unsigned value);
140 virtual bool set_do_qlp_coeff_prec_search(
bool value);
141 virtual bool set_do_escape_coding(
bool value);
142 virtual bool set_do_exhaustive_model_search(
bool value);
143 virtual bool set_min_residual_partition_order(
unsigned value);
144 virtual bool set_max_residual_partition_order(
unsigned value);
145 virtual bool set_rice_parameter_search_dist(
unsigned value);
146 virtual bool set_total_samples_estimate(FLAC__uint64 value);
151 State get_state()
const;
153 virtual void get_verify_decoder_error_stats(FLAC__uint64 *absolute_sample,
unsigned *frame_number,
unsigned *channel,
unsigned *sample, FLAC__int32 *expected, FLAC__int32 *got);
154 virtual bool get_verify()
const;
155 virtual bool get_streamable_subset()
const;
156 virtual bool get_do_mid_side_stereo()
const;
157 virtual bool get_loose_mid_side_stereo()
const;
158 virtual unsigned get_channels()
const;
159 virtual unsigned get_bits_per_sample()
const;
160 virtual unsigned get_sample_rate()
const;
161 virtual unsigned get_blocksize()
const;
162 virtual unsigned get_max_lpc_order()
const;
163 virtual unsigned get_qlp_coeff_precision()
const;
164 virtual bool get_do_qlp_coeff_prec_search()
const;
165 virtual bool get_do_escape_coding()
const;
166 virtual bool get_do_exhaustive_model_search()
const;
167 virtual unsigned get_min_residual_partition_order()
const;
168 virtual unsigned get_max_residual_partition_order()
const;
169 virtual unsigned get_rice_parameter_search_dist()
const;
170 virtual FLAC__uint64 get_total_samples_estimate()
const;
175 virtual bool finish();
177 virtual bool process(
const FLAC__int32 *
const buffer[],
unsigned samples);
178 virtual bool process_interleaved(
const FLAC__int32 buffer[],
unsigned samples);
193 virtual void metadata_callback(const ::FLAC__StreamMetadata *metadata);
195 #if (defined _MSC_VER) || (defined __BORLANDC__) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96))) || (defined __SUNPRO_CC)
202 static ::FLAC__StreamEncoderWriteStatus write_callback_(const ::FLAC__StreamEncoder *encoder,
const FLAC__byte buffer[],
size_t bytes,
unsigned samples,
unsigned current_frame,
void *client_data);
205 static void metadata_callback_(const ::FLAC__StreamEncoder *encoder, const ::FLAC__StreamMetadata *metadata,
void *client_data);
209 void operator=(
const Stream &);
245 virtual void progress_callback(FLAC__uint64 bytes_written, FLAC__uint64 samples_written,
unsigned frames_written,
unsigned total_frames_estimate);
250 static void progress_callback_(const ::FLAC__StreamEncoder *encoder, FLAC__uint64 bytes_written, FLAC__uint64 samples_written,
unsigned frames_written,
unsigned total_frames_estimate,
void *client_data);
254 void operator=(
const Stream &);