The basic usage of this encoder is as follows:
The seekable stream encoder is a wrapper around the stream encoder with callbacks for seeking the output and reporting the output stream position. This allows the encoder to go back and rewrite some of the metadata after encoding if necessary, and provides the metadata callback of the stream encoder internally. However, you must provide seek and tell callbacks (see FLAC__seekable_stream_encoder_set_seek_callback() and FLAC__seekable_stream_encoder_set_tell_callback()).
Make sure to read the detailed description of the stream encoder module since the seekable stream encoder inherits much of its behavior.
The "set" functions may only be called when the encoder is in the state FLAC__SEEKABLE_STREAM_ENCODER_UNINITIALIZED, i.e. after FLAC__seekable_stream_encoder_new() or FLAC__seekable_stream_encoder_finish(), but before FLAC__seekable_stream_encoder_init(). If this is the case they will return true
, otherwise false
.
FLAC__seekable_stream_encoder_finish() resets all settings to the constructor defaults, including the callbacks.
|
Signature for the seek callback. See FLAC__seekable_stream_encoder_set_seek_callback() for more info.
|
|
Signature for the tell callback. See FLAC__seekable_stream_encoder_set_tell_callback() for more info.
|
|
Signature for the write callback. See FLAC__seekable_stream_encoder_set_write_callback() and FLAC__StreamEncoderWriteCallback for more info.
|
|
State values for a FLAC__SeekableStreamEncoder The encoder's state can be obtained by calling FLAC__seekable_stream_encoder_get_state().
|
|
Return values for the FLAC__SeekableStreamEncoder seek callback. |
|
Return values for the FLAC__SeekableStreamEncoder tell callback. |
|
Create a new seekable stream encoder instance. The instance is created with default settings; see the individual FLAC__seekable_stream_encoder_set_*() functions for each setting's default.
|
|
Free an encoder instance. Deletes the object pointed to by encoder.
encoder != NULL |
|
This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_verify().
encoder != NULL
|
|
This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_streamable_subset().
encoder != NULL
|
|
This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_do_mid_side_stereo().
encoder != NULL
|
|
This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_loose_mid_side_stereo().
encoder != NULL
|
|
This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_channels().
encoder != NULL
|
|
This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_bits_per_sample().
encoder != NULL
|
|
This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_sample_rate().
encoder != NULL
|
|
This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_blocksize().
encoder != NULL
|
|
This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_max_lpc_order().
encoder != NULL
|
|
This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_qlp_coeff_precision().
encoder != NULL
|
|
This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_do_qlp_coeff_prec_search().
encoder != NULL
|
|
This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_do_escape_coding().
encoder != NULL
|
|
This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_do_exhaustive_model_search().
encoder != NULL
|
|
This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_min_residual_partition_order().
encoder != NULL
|
|
This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_max_residual_partition_order().
encoder != NULL
|
|
This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_rice_parameter_search_dist().
encoder != NULL
|
|
This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_total_samples_estimate().
encoder != NULL
|
|
This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_metadata().
encoder != NULL
|
|
Set the seek callback. The supplied function will be called when the encoder needs to seek the output stream. The encoder will pass the absolute byte offset to seek to, 0 meaning the beginning of the stream.
encoder != NULL value != NULL
|
|
Set the tell callback. The supplied function will be called when the encoder needs to know the current position of the output stream.
encoder != NULL value != NULL
|
|
Set the write callback. This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_set_write_callback().
encoder != NULL value != NULL
|
|
Set the client data to be passed back to callbacks. This value will be supplied to callbacks in their client_data argument.
encoder != NULL
|
|
Get the current encoder state.
encoder != NULL
|
|
Get the state of the underlying stream encoder. Useful when the seekable stream encoder state is
encoder != NULL
|
|
Get the state of the underlying stream encoder's verify decoder. Useful when the seekable stream encoder state is
encoder != NULL
|
|
Get the current encoder state as a C string. This version automatically resolves
encoder != NULL
|
|
Get relevant values about the nature of a verify decoder error. Inherited from FLAC__stream_encoder_get_verify_decoder_error_stats(). Useful when the seekable stream encoder state is
encoder != NULL |
|
Get the "verify" flag. This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_verify().
encoder != NULL
|
|
Get the "streamable subset" flag. This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_streamable_subset().
encoder != NULL
|
|
Get the "mid/side stereo coding" flag. This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_do_mid_side_stereo().
encoder != NULL
|
|
Get the "adaptive mid/side switching" flag. This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_loose_mid_side_stereo().
encoder != NULL
|
|
Get the number of input channels being processed. This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_channels().
encoder != NULL
|
|
Get the input sample resolution setting. This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_bits_per_sample().
encoder != NULL
|
|
Get the input sample rate setting. This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_sample_rate().
encoder != NULL
|
|
Get the blocksize setting. This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_blocksize().
encoder != NULL
|
|
Get the maximum LPC order setting. This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_max_lpc_order().
encoder != NULL
|
|
Get the quantized linear predictor coefficient precision setting. This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_qlp_coeff_precision().
encoder != NULL
|
|
Get the qlp coefficient precision search flag. This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_do_qlp_coeff_prec_search().
encoder != NULL
|
|
Get the "escape coding" flag. This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_do_escape_coding().
encoder != NULL
|
|
Get the exhaustive model search flag. This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_do_exhaustive_model_search().
encoder != NULL
|
|
Get the minimum residual partition order setting. This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_min_residual_partition_order().
encoder != NULL
|
|
Get maximum residual partition order setting. This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_max_residual_partition_order().
encoder != NULL
|
|
Get the Rice parameter search distance setting. This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_rice_parameter_search_dist().
encoder != NULL
|
|
Get the previously set estimate of the total samples to be encoded. This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_get_total_samples_estimate().
encoder != NULL
|
|
Initialize the encoder instance. Should be called after FLAC__seekable_stream_encoder_new() and FLAC__seekable_stream_encoder_set_*() but before FLAC__seekable_stream_encoder_process() or FLAC__seekable_stream_encoder_process_interleaved(). Will set and return the encoder state, which will be FLAC__SEEKABLE_STREAM_ENCODER_OK if initialization succeeded.
The call to FLAC__seekable_stream_encoder_init() currently will also immediately call the write callback with the
encoder != NULL
|
|
Finish the encoding process. Flushes the encoding buffer, releases resources, resets the encoder settings to their defaults, and returns the encoder state to FLAC__SEEKABLE_STREAM_ENCODER_UNINITIALIZED. In the event of a prematurely-terminated encode, it is not strictly necessary to call this immediately before FLAC__seekable_stream_encoder_delete() but it is good practice to match every FLAC__seekable_stream_encoder_init() with a FLAC__seekable_stream_encoder_finish().
encoder != NULL |
|
Submit data for encoding. This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_process().
encoder != NULL
|
|
Submit data for encoding. This is inherited from FLAC__StreamEncoder; see FLAC__stream_encoder_process_interleaved().
encoder != NULL
|
|
Maps a FLAC__SeekableStreamEncoderState to a C string. Using a FLAC__SeekableStreamEncoderState as the index to this array will give the string equivalent. The contents should not be modified. |
|
Maps a FLAC__SeekableStreamEncoderSeekStatus to a C string. Using a FLAC__SeekableStreamEncoderSeekStatus as the index to this array will give the string equivalent. The contents should not be modified. |
|
Maps a FLAC__SeekableStreamEncoderTellStatus to a C string. Using a FLAC__SeekableStreamEncoderTellStatus as the index to this array will give the string equivalent. The contents should not be modified. |