FLAC: include/FLAC/stream_encoder.h Source File

FLAC 1.5.0 Free Lossless Audio Codec

stream_encoder.h
Go to the documentation of this file.
1/* libFLAC - Free Lossless Audio Codec library
2 * Copyright (C) 2000-2009 Josh Coalson
3 * Copyright (C) 2011-2025 Xiph.Org Foundation
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * - Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * - Neither the name of the Xiph.org Foundation nor the names of its
17 * contributors may be used to endorse or promote products derived from
18 * this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#ifndef FLAC__STREAM_ENCODER_H
34#define FLAC__STREAM_ENCODER_H
35
36#include <stdio.h> /* for FILE */
37#include "export.h"
38#include "format.h"
39#include "stream_decoder.h"
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
45
241 typedef enum {
242
243 FLAC__STREAM_ENCODER_OK = 0,
246 FLAC__STREAM_ENCODER_UNINITIALIZED,
252 FLAC__STREAM_ENCODER_OGG_ERROR,
255 FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR,
260 FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA,
265 FLAC__STREAM_ENCODER_CLIENT_ERROR,
268 FLAC__STREAM_ENCODER_IO_ERROR,
273 FLAC__STREAM_ENCODER_FRAMING_ERROR,
278 FLAC__STREAM_ENCODER_MEMORY_ALLOCATION_ERROR
281} FLAC__StreamEncoderState;
282
288extern FLAC_API const char * const FLAC__StreamEncoderStateString[];
289
290
291#define FLAC__STREAM_ENCODER_SET_NUM_THREADS_OK 0
292#define FLAC__STREAM_ENCODER_SET_NUM_THREADS_NOT_COMPILED_WITH_MULTITHREADING_ENABLED 1
293#define FLAC__STREAM_ENCODER_SET_NUM_THREADS_ALREADY_INITIALIZED 2
294#define FLAC__STREAM_ENCODER_SET_NUM_THREADS_TOO_MANY_THREADS 3
295
298 typedef enum {
299
300 FLAC__STREAM_ENCODER_INIT_STATUS_OK = 0,
303 FLAC__STREAM_ENCODER_INIT_STATUS_ENCODER_ERROR,
306 FLAC__STREAM_ENCODER_INIT_STATUS_UNSUPPORTED_CONTAINER,
311 FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_CALLBACKS,
314 FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_NUMBER_OF_CHANNELS,
317 FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BITS_PER_SAMPLE,
322 FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_SAMPLE_RATE,
325 FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BLOCK_SIZE,
328 FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_MAX_LPC_ORDER,
331 FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_QLP_COEFF_PRECISION,
334 FLAC__STREAM_ENCODER_INIT_STATUS_BLOCK_SIZE_TOO_SMALL_FOR_LPC_ORDER,
337 FLAC__STREAM_ENCODER_INIT_STATUS_NOT_STREAMABLE,
340 FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_METADATA,
349 FLAC__STREAM_ENCODER_INIT_STATUS_ALREADY_INITIALIZED
355} FLAC__StreamEncoderInitStatus;
356
362extern FLAC_API const char * const FLAC__StreamEncoderInitStatusString[];
363
364
367 typedef enum {
368
369 FLAC__STREAM_ENCODER_READ_STATUS_CONTINUE,
372 FLAC__STREAM_ENCODER_READ_STATUS_END_OF_STREAM,
375 FLAC__STREAM_ENCODER_READ_STATUS_ABORT,
378 FLAC__STREAM_ENCODER_READ_STATUS_UNSUPPORTED
381} FLAC__StreamEncoderReadStatus;
382
388extern FLAC_API const char * const FLAC__StreamEncoderReadStatusString[];
389
390
393 typedef enum {
394
395 FLAC__STREAM_ENCODER_WRITE_STATUS_OK = 0,
398 FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR
401} FLAC__StreamEncoderWriteStatus;
402
408extern FLAC_API const char * const FLAC__StreamEncoderWriteStatusString[];
409
410
413 typedef enum {
414
415 FLAC__STREAM_ENCODER_SEEK_STATUS_OK,
418 FLAC__STREAM_ENCODER_SEEK_STATUS_ERROR,
421 FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED
424} FLAC__StreamEncoderSeekStatus;
425
431extern FLAC_API const char * const FLAC__StreamEncoderSeekStatusString[];
432
433
436 typedef enum {
437
438 FLAC__STREAM_ENCODER_TELL_STATUS_OK,
441 FLAC__STREAM_ENCODER_TELL_STATUS_ERROR,
444 FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED
447} FLAC__StreamEncoderTellStatus;
448
454extern FLAC_API const char * const FLAC__StreamEncoderTellStatusString[];
455
456
457/***********************************************************************
458 *
459 * class FLAC__StreamEncoder
460 *
461 ***********************************************************************/
462
463struct FLAC__StreamEncoderProtected;
464struct FLAC__StreamEncoderPrivate;
469 typedef struct {
470 struct FLAC__StreamEncoderProtected *protected_; /* avoid the C++ keyword 'protected' */
471 struct FLAC__StreamEncoderPrivate *private_; /* avoid the C++ keyword 'private' */
472} FLAC__StreamEncoder;
473
523 typedef FLAC__StreamEncoderReadStatus (*FLAC__StreamEncoderReadCallback)(const FLAC__StreamEncoder *encoder, FLAC__byte buffer[], size_t *bytes, void *client_data);
524
567 typedef FLAC__StreamEncoderWriteStatus (*FLAC__StreamEncoderWriteCallback)(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], size_t bytes, uint32_t samples, uint32_t current_frame, void *client_data);
568
601 typedef FLAC__StreamEncoderSeekStatus (*FLAC__StreamEncoderSeekCallback)(const FLAC__StreamEncoder *encoder, FLAC__uint64 absolute_byte_offset, void *client_data);
602
646 typedef FLAC__StreamEncoderTellStatus (*FLAC__StreamEncoderTellCallback)(const FLAC__StreamEncoder *encoder, FLAC__uint64 *absolute_byte_offset, void *client_data);
647
665 typedef void (*FLAC__StreamEncoderMetadataCallback)(const FLAC__StreamEncoder *encoder, const FLAC__StreamMetadata *metadata, void *client_data);
666
688 typedef void (*FLAC__StreamEncoderProgressCallback)(const FLAC__StreamEncoder *encoder, FLAC__uint64 bytes_written, FLAC__uint64 samples_written, uint32_t frames_written, uint32_t total_frames_estimate, void *client_data);
689
690
691/***********************************************************************
692 *
693 * Class constructor/destructor
694 *
695 ***********************************************************************/
696
704 FLAC_API FLAC__StreamEncoder *FLAC__stream_encoder_new(void);
705
712 FLAC_API void FLAC__stream_encoder_delete(FLAC__StreamEncoder *encoder);
713
714
715/***********************************************************************
716 *
717 * Public class method prototypes
718 *
719 ***********************************************************************/
720
738 FLAC_API FLAC__bool FLAC__stream_encoder_set_ogg_serial_number(FLAC__StreamEncoder *encoder, long serial_number);
739
754 FLAC_API FLAC__bool FLAC__stream_encoder_set_verify(FLAC__StreamEncoder *encoder, FLAC__bool value);
755
772 FLAC_API FLAC__bool FLAC__stream_encoder_set_streamable_subset(FLAC__StreamEncoder *encoder, FLAC__bool value);
773
784 FLAC_API FLAC__bool FLAC__stream_encoder_set_channels(FLAC__StreamEncoder *encoder, uint32_t value);
785
800 FLAC_API FLAC__bool FLAC__stream_encoder_set_bits_per_sample(FLAC__StreamEncoder *encoder, uint32_t value);
801
812 FLAC_API FLAC__bool FLAC__stream_encoder_set_sample_rate(FLAC__StreamEncoder *encoder, uint32_t value);
813
875 FLAC_API FLAC__bool FLAC__stream_encoder_set_compression_level(FLAC__StreamEncoder *encoder, uint32_t value);
876
890 FLAC_API FLAC__bool FLAC__stream_encoder_set_blocksize(FLAC__StreamEncoder *encoder, uint32_t value);
891
904 FLAC_API FLAC__bool FLAC__stream_encoder_set_do_mid_side_stereo(FLAC__StreamEncoder *encoder, FLAC__bool value);
905
920 FLAC_API FLAC__bool FLAC__stream_encoder_set_loose_mid_side_stereo(FLAC__StreamEncoder *encoder, FLAC__bool value);
921
1002 FLAC_API FLAC__bool FLAC__stream_encoder_set_apodization(FLAC__StreamEncoder *encoder, const char *specification);
1003
1014 FLAC_API FLAC__bool FLAC__stream_encoder_set_max_lpc_order(FLAC__StreamEncoder *encoder, uint32_t value);
1015
1028 FLAC_API FLAC__bool FLAC__stream_encoder_set_qlp_coeff_precision(FLAC__StreamEncoder *encoder, uint32_t value);
1029
1042 FLAC_API FLAC__bool FLAC__stream_encoder_set_do_qlp_coeff_prec_search(FLAC__StreamEncoder *encoder, FLAC__bool value);
1043
1054 FLAC_API FLAC__bool FLAC__stream_encoder_set_do_escape_coding(FLAC__StreamEncoder *encoder, FLAC__bool value);
1055
1068 FLAC_API FLAC__bool FLAC__stream_encoder_set_do_exhaustive_model_search(FLAC__StreamEncoder *encoder, FLAC__bool value);
1069
1091 FLAC_API FLAC__bool FLAC__stream_encoder_set_min_residual_partition_order(FLAC__StreamEncoder *encoder, uint32_t value);
1092
1114 FLAC_API FLAC__bool FLAC__stream_encoder_set_max_residual_partition_order(FLAC__StreamEncoder *encoder, uint32_t value);
1115
1160 FLAC_API uint32_t FLAC__stream_encoder_set_num_threads(FLAC__StreamEncoder *encoder, uint32_t value);
1161
1172 FLAC_API FLAC__bool FLAC__stream_encoder_set_rice_parameter_search_dist(FLAC__StreamEncoder *encoder, uint32_t value);
1173
1188 FLAC_API FLAC__bool FLAC__stream_encoder_set_total_samples_estimate(FLAC__StreamEncoder *encoder, FLAC__uint64 value);
1189
1271 FLAC_API FLAC__bool FLAC__stream_encoder_set_metadata(FLAC__StreamEncoder *encoder, FLAC__StreamMetadata **metadata, uint32_t num_blocks);
1272
1289 FLAC_API FLAC__bool FLAC__stream_encoder_set_limit_min_bitrate(FLAC__StreamEncoder *encoder, FLAC__bool value);
1290
1299 FLAC_API FLAC__StreamEncoderState FLAC__stream_encoder_get_state(const FLAC__StreamEncoder *encoder);
1300
1311 FLAC_API FLAC__StreamDecoderState FLAC__stream_encoder_get_verify_decoder_state(const FLAC__StreamEncoder *encoder);
1312
1324 FLAC_API const char *FLAC__stream_encoder_get_resolved_state_string(const FLAC__StreamEncoder *encoder);
1325
1343 FLAC_API void FLAC__stream_encoder_get_verify_decoder_error_stats(const FLAC__StreamEncoder *encoder, FLAC__uint64 *absolute_sample, uint32_t *frame_number, uint32_t *channel, uint32_t *sample, FLAC__int32 *expected, FLAC__int32 *got);
1344
1353 FLAC_API FLAC__bool FLAC__stream_encoder_get_verify(const FLAC__StreamEncoder *encoder);
1354
1363 FLAC_API FLAC__bool FLAC__stream_encoder_get_streamable_subset(const FLAC__StreamEncoder *encoder);
1364
1373 FLAC_API uint32_t FLAC__stream_encoder_get_channels(const FLAC__StreamEncoder *encoder);
1374
1383 FLAC_API uint32_t FLAC__stream_encoder_get_bits_per_sample(const FLAC__StreamEncoder *encoder);
1384
1393 FLAC_API uint32_t FLAC__stream_encoder_get_sample_rate(const FLAC__StreamEncoder *encoder);
1394
1403 FLAC_API uint32_t FLAC__stream_encoder_get_blocksize(const FLAC__StreamEncoder *encoder);
1404
1413 FLAC_API FLAC__bool FLAC__stream_encoder_get_do_mid_side_stereo(const FLAC__StreamEncoder *encoder);
1414
1423 FLAC_API FLAC__bool FLAC__stream_encoder_get_loose_mid_side_stereo(const FLAC__StreamEncoder *encoder);
1424
1433 FLAC_API uint32_t FLAC__stream_encoder_get_max_lpc_order(const FLAC__StreamEncoder *encoder);
1434
1443 FLAC_API uint32_t FLAC__stream_encoder_get_qlp_coeff_precision(const FLAC__StreamEncoder *encoder);
1444
1453 FLAC_API FLAC__bool FLAC__stream_encoder_get_do_qlp_coeff_prec_search(const FLAC__StreamEncoder *encoder);
1454
1463 FLAC_API FLAC__bool FLAC__stream_encoder_get_do_escape_coding(const FLAC__StreamEncoder *encoder);
1464
1473 FLAC_API FLAC__bool FLAC__stream_encoder_get_do_exhaustive_model_search(const FLAC__StreamEncoder *encoder);
1474
1483 FLAC_API uint32_t FLAC__stream_encoder_get_min_residual_partition_order(const FLAC__StreamEncoder *encoder);
1484
1493 FLAC_API uint32_t FLAC__stream_encoder_get_max_residual_partition_order(const FLAC__StreamEncoder *encoder);
1494
1503 FLAC_API uint32_t FLAC__stream_encoder_get_num_threads(const FLAC__StreamEncoder *encoder);
1504
1513 FLAC_API uint32_t FLAC__stream_encoder_get_rice_parameter_search_dist(const FLAC__StreamEncoder *encoder);
1514
1526 FLAC_API FLAC__uint64 FLAC__stream_encoder_get_total_samples_estimate(const FLAC__StreamEncoder *encoder);
1527
1536 FLAC_API FLAC__bool FLAC__stream_encoder_get_limit_min_bitrate(const FLAC__StreamEncoder *encoder);
1537
1599 FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_stream(FLAC__StreamEncoder *encoder, FLAC__StreamEncoderWriteCallback write_callback, FLAC__StreamEncoderSeekCallback seek_callback, FLAC__StreamEncoderTellCallback tell_callback, FLAC__StreamEncoderMetadataCallback metadata_callback, void *client_data);
1600
1667 FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_ogg_stream(FLAC__StreamEncoder *encoder, FLAC__StreamEncoderReadCallback read_callback, FLAC__StreamEncoderWriteCallback write_callback, FLAC__StreamEncoderSeekCallback seek_callback, FLAC__StreamEncoderTellCallback tell_callback, FLAC__StreamEncoderMetadataCallback metadata_callback, void *client_data);
1668
1702 FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_FILE(FLAC__StreamEncoder *encoder, FILE *file, FLAC__StreamEncoderProgressCallback progress_callback, void *client_data);
1703
1737 FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_ogg_FILE(FLAC__StreamEncoder *encoder, FILE *file, FLAC__StreamEncoderProgressCallback progress_callback, void *client_data);
1738
1773 FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_file(FLAC__StreamEncoder *encoder, const char *filename, FLAC__StreamEncoderProgressCallback progress_callback, void *client_data);
1774
1809 FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_ogg_file(FLAC__StreamEncoder *encoder, const char *filename, FLAC__StreamEncoderProgressCallback progress_callback, void *client_data);
1810
1837 FLAC_API FLAC__bool FLAC__stream_encoder_finish(FLAC__StreamEncoder *encoder);
1838
1864 FLAC_API FLAC__bool FLAC__stream_encoder_process(FLAC__StreamEncoder *encoder, const FLAC__int32 * const buffer[], uint32_t samples);
1865
1896 FLAC_API FLAC__bool FLAC__stream_encoder_process_interleaved(FLAC__StreamEncoder *encoder, const FLAC__int32 buffer[], uint32_t samples);
1897
1898/* \} */
1899
1900#ifdef __cplusplus
1901}
1902#endif
1903
1904#endif
export.h
This module contains #defines and symbols for exporting function calls, and providing version informa...
format.h
This module contains structure definitions for the representation of FLAC format components in memory...
FLAC_API
#define FLAC_API
Definition export.h:91
FLAC__StreamDecoderState
FLAC__StreamDecoderState
Definition stream_decoder.h:202
FLAC__stream_encoder_set_do_exhaustive_model_search
FLAC__bool FLAC__stream_encoder_set_do_exhaustive_model_search(FLAC__StreamEncoder *encoder, FLAC__bool value)
FLAC__stream_encoder_get_state
FLAC__StreamEncoderState FLAC__stream_encoder_get_state(const FLAC__StreamEncoder *encoder)
FLAC__StreamEncoderMetadataCallback
void(* FLAC__StreamEncoderMetadataCallback)(const FLAC__StreamEncoder *encoder, const FLAC__StreamMetadata *metadata, void *client_data)
Definition stream_encoder.h:665
FLAC__stream_encoder_get_do_escape_coding
FLAC__bool FLAC__stream_encoder_get_do_escape_coding(const FLAC__StreamEncoder *encoder)
FLAC__StreamEncoderInitStatusString
const char *const FLAC__StreamEncoderInitStatusString[]
FLAC__stream_encoder_init_FILE
FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_FILE(FLAC__StreamEncoder *encoder, FILE *file, FLAC__StreamEncoderProgressCallback progress_callback, void *client_data)
FLAC__StreamEncoderStateString
const char *const FLAC__StreamEncoderStateString[]
FLAC__stream_encoder_get_loose_mid_side_stereo
FLAC__bool FLAC__stream_encoder_get_loose_mid_side_stereo(const FLAC__StreamEncoder *encoder)
FLAC__stream_encoder_new
FLAC__StreamEncoder * FLAC__stream_encoder_new(void)
FLAC__StreamEncoderReadStatusString
const char *const FLAC__StreamEncoderReadStatusString[]
FLAC__stream_encoder_get_bits_per_sample
uint32_t FLAC__stream_encoder_get_bits_per_sample(const FLAC__StreamEncoder *encoder)
FLAC__stream_encoder_set_qlp_coeff_precision
FLAC__bool FLAC__stream_encoder_set_qlp_coeff_precision(FLAC__StreamEncoder *encoder, uint32_t value)
FLAC__StreamEncoderReadCallback
FLAC__StreamEncoderReadStatus(* FLAC__StreamEncoderReadCallback)(const FLAC__StreamEncoder *encoder, FLAC__byte buffer[], size_t *bytes, void *client_data)
Definition stream_encoder.h:523
FLAC__stream_encoder_get_streamable_subset
FLAC__bool FLAC__stream_encoder_get_streamable_subset(const FLAC__StreamEncoder *encoder)
FLAC__stream_encoder_get_verify_decoder_error_stats
void FLAC__stream_encoder_get_verify_decoder_error_stats(const FLAC__StreamEncoder *encoder, FLAC__uint64 *absolute_sample, uint32_t *frame_number, uint32_t *channel, uint32_t *sample, FLAC__int32 *expected, FLAC__int32 *got)
FLAC__stream_encoder_get_num_threads
uint32_t FLAC__stream_encoder_get_num_threads(const FLAC__StreamEncoder *encoder)
FLAC__StreamEncoderWriteCallback
FLAC__StreamEncoderWriteStatus(* FLAC__StreamEncoderWriteCallback)(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], size_t bytes, uint32_t samples, uint32_t current_frame, void *client_data)
Definition stream_encoder.h:567
FLAC__stream_encoder_set_rice_parameter_search_dist
FLAC__bool FLAC__stream_encoder_set_rice_parameter_search_dist(FLAC__StreamEncoder *encoder, uint32_t value)
FLAC__StreamEncoderReadStatus
FLAC__StreamEncoderReadStatus
Definition stream_encoder.h:367
FLAC__stream_encoder_get_do_mid_side_stereo
FLAC__bool FLAC__stream_encoder_get_do_mid_side_stereo(const FLAC__StreamEncoder *encoder)
FLAC__stream_encoder_finish
FLAC__bool FLAC__stream_encoder_finish(FLAC__StreamEncoder *encoder)
FLAC__stream_encoder_set_streamable_subset
FLAC__bool FLAC__stream_encoder_set_streamable_subset(FLAC__StreamEncoder *encoder, FLAC__bool value)
FLAC__StreamEncoderWriteStatus
FLAC__StreamEncoderWriteStatus
Definition stream_encoder.h:393
FLAC__StreamEncoderInitStatus
FLAC__StreamEncoderInitStatus
Definition stream_encoder.h:298
FLAC__stream_encoder_set_do_mid_side_stereo
FLAC__bool FLAC__stream_encoder_set_do_mid_side_stereo(FLAC__StreamEncoder *encoder, FLAC__bool value)
FLAC__stream_encoder_get_channels
uint32_t FLAC__stream_encoder_get_channels(const FLAC__StreamEncoder *encoder)
FLAC__StreamEncoderProgressCallback
void(* FLAC__StreamEncoderProgressCallback)(const FLAC__StreamEncoder *encoder, FLAC__uint64 bytes_written, FLAC__uint64 samples_written, uint32_t frames_written, uint32_t total_frames_estimate, void *client_data)
Definition stream_encoder.h:688
FLAC__stream_encoder_init_ogg_file
FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_ogg_file(FLAC__StreamEncoder *encoder, const char *filename, FLAC__StreamEncoderProgressCallback progress_callback, void *client_data)
FLAC__stream_encoder_set_do_qlp_coeff_prec_search
FLAC__bool FLAC__stream_encoder_set_do_qlp_coeff_prec_search(FLAC__StreamEncoder *encoder, FLAC__bool value)
FLAC__stream_encoder_get_min_residual_partition_order
uint32_t FLAC__stream_encoder_get_min_residual_partition_order(const FLAC__StreamEncoder *encoder)
FLAC__stream_encoder_init_ogg_FILE
FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_ogg_FILE(FLAC__StreamEncoder *encoder, FILE *file, FLAC__StreamEncoderProgressCallback progress_callback, void *client_data)
FLAC__stream_encoder_get_max_lpc_order
uint32_t FLAC__stream_encoder_get_max_lpc_order(const FLAC__StreamEncoder *encoder)
FLAC__stream_encoder_set_apodization
FLAC__bool FLAC__stream_encoder_set_apodization(FLAC__StreamEncoder *encoder, const char *specification)
FLAC__stream_encoder_get_do_qlp_coeff_prec_search
FLAC__bool FLAC__stream_encoder_get_do_qlp_coeff_prec_search(const FLAC__StreamEncoder *encoder)
FLAC__StreamEncoderSeekStatus
FLAC__StreamEncoderSeekStatus
Definition stream_encoder.h:413
FLAC__stream_encoder_process_interleaved
FLAC__bool FLAC__stream_encoder_process_interleaved(FLAC__StreamEncoder *encoder, const FLAC__int32 buffer[], uint32_t samples)
FLAC__stream_encoder_get_max_residual_partition_order
uint32_t FLAC__stream_encoder_get_max_residual_partition_order(const FLAC__StreamEncoder *encoder)
FLAC__StreamEncoderSeekCallback
FLAC__StreamEncoderSeekStatus(* FLAC__StreamEncoderSeekCallback)(const FLAC__StreamEncoder *encoder, FLAC__uint64 absolute_byte_offset, void *client_data)
Definition stream_encoder.h:601
FLAC__stream_encoder_delete
void FLAC__stream_encoder_delete(FLAC__StreamEncoder *encoder)
FLAC__stream_encoder_get_limit_min_bitrate
FLAC__bool FLAC__stream_encoder_get_limit_min_bitrate(const FLAC__StreamEncoder *encoder)
FLAC__stream_encoder_set_bits_per_sample
FLAC__bool FLAC__stream_encoder_set_bits_per_sample(FLAC__StreamEncoder *encoder, uint32_t value)
FLAC__stream_encoder_set_verify
FLAC__bool FLAC__stream_encoder_set_verify(FLAC__StreamEncoder *encoder, FLAC__bool value)
FLAC__stream_encoder_set_loose_mid_side_stereo
FLAC__bool FLAC__stream_encoder_set_loose_mid_side_stereo(FLAC__StreamEncoder *encoder, FLAC__bool value)
FLAC__stream_encoder_get_do_exhaustive_model_search
FLAC__bool FLAC__stream_encoder_get_do_exhaustive_model_search(const FLAC__StreamEncoder *encoder)
FLAC__stream_encoder_init_stream
FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_stream(FLAC__StreamEncoder *encoder, FLAC__StreamEncoderWriteCallback write_callback, FLAC__StreamEncoderSeekCallback seek_callback, FLAC__StreamEncoderTellCallback tell_callback, FLAC__StreamEncoderMetadataCallback metadata_callback, void *client_data)
FLAC__stream_encoder_set_metadata
FLAC__bool FLAC__stream_encoder_set_metadata(FLAC__StreamEncoder *encoder, FLAC__StreamMetadata **metadata, uint32_t num_blocks)
FLAC__stream_encoder_get_verify_decoder_state
FLAC__StreamDecoderState FLAC__stream_encoder_get_verify_decoder_state(const FLAC__StreamEncoder *encoder)
FLAC__stream_encoder_process
FLAC__bool FLAC__stream_encoder_process(FLAC__StreamEncoder *encoder, const FLAC__int32 *const buffer[], uint32_t samples)
FLAC__stream_encoder_set_min_residual_partition_order
FLAC__bool FLAC__stream_encoder_set_min_residual_partition_order(FLAC__StreamEncoder *encoder, uint32_t value)
FLAC__stream_encoder_get_qlp_coeff_precision
uint32_t FLAC__stream_encoder_get_qlp_coeff_precision(const FLAC__StreamEncoder *encoder)
FLAC__stream_encoder_init_ogg_stream
FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_ogg_stream(FLAC__StreamEncoder *encoder, FLAC__StreamEncoderReadCallback read_callback, FLAC__StreamEncoderWriteCallback write_callback, FLAC__StreamEncoderSeekCallback seek_callback, FLAC__StreamEncoderTellCallback tell_callback, FLAC__StreamEncoderMetadataCallback metadata_callback, void *client_data)
FLAC__stream_encoder_init_file
FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_file(FLAC__StreamEncoder *encoder, const char *filename, FLAC__StreamEncoderProgressCallback progress_callback, void *client_data)
FLAC__stream_encoder_set_channels
FLAC__bool FLAC__stream_encoder_set_channels(FLAC__StreamEncoder *encoder, uint32_t value)
FLAC__stream_encoder_get_verify
FLAC__bool FLAC__stream_encoder_get_verify(const FLAC__StreamEncoder *encoder)
FLAC__StreamEncoderWriteStatusString
const char *const FLAC__StreamEncoderWriteStatusString[]
FLAC__stream_encoder_get_total_samples_estimate
FLAC__uint64 FLAC__stream_encoder_get_total_samples_estimate(const FLAC__StreamEncoder *encoder)
FLAC__stream_encoder_set_sample_rate
FLAC__bool FLAC__stream_encoder_set_sample_rate(FLAC__StreamEncoder *encoder, uint32_t value)
FLAC__stream_encoder_set_compression_level
FLAC__bool FLAC__stream_encoder_set_compression_level(FLAC__StreamEncoder *encoder, uint32_t value)
FLAC__StreamEncoderTellStatus
FLAC__StreamEncoderTellStatus
Definition stream_encoder.h:436
FLAC__stream_encoder_set_total_samples_estimate
FLAC__bool FLAC__stream_encoder_set_total_samples_estimate(FLAC__StreamEncoder *encoder, FLAC__uint64 value)
FLAC__stream_encoder_set_max_residual_partition_order
FLAC__bool FLAC__stream_encoder_set_max_residual_partition_order(FLAC__StreamEncoder *encoder, uint32_t value)
FLAC__StreamEncoderSeekStatusString
const char *const FLAC__StreamEncoderSeekStatusString[]
FLAC__StreamEncoderTellCallback
FLAC__StreamEncoderTellStatus(* FLAC__StreamEncoderTellCallback)(const FLAC__StreamEncoder *encoder, FLAC__uint64 *absolute_byte_offset, void *client_data)
Definition stream_encoder.h:646
FLAC__stream_encoder_set_blocksize
FLAC__bool FLAC__stream_encoder_set_blocksize(FLAC__StreamEncoder *encoder, uint32_t value)
FLAC__StreamEncoderState
FLAC__StreamEncoderState
Definition stream_encoder.h:241
FLAC__stream_encoder_set_limit_min_bitrate
FLAC__bool FLAC__stream_encoder_set_limit_min_bitrate(FLAC__StreamEncoder *encoder, FLAC__bool value)
FLAC__stream_encoder_get_rice_parameter_search_dist
uint32_t FLAC__stream_encoder_get_rice_parameter_search_dist(const FLAC__StreamEncoder *encoder)
FLAC__stream_encoder_set_max_lpc_order
FLAC__bool FLAC__stream_encoder_set_max_lpc_order(FLAC__StreamEncoder *encoder, uint32_t value)
FLAC__stream_encoder_set_num_threads
uint32_t FLAC__stream_encoder_set_num_threads(FLAC__StreamEncoder *encoder, uint32_t value)
FLAC__stream_encoder_get_sample_rate
uint32_t FLAC__stream_encoder_get_sample_rate(const FLAC__StreamEncoder *encoder)
FLAC__stream_encoder_set_do_escape_coding
FLAC__bool FLAC__stream_encoder_set_do_escape_coding(FLAC__StreamEncoder *encoder, FLAC__bool value)
FLAC__stream_encoder_set_ogg_serial_number
FLAC__bool FLAC__stream_encoder_set_ogg_serial_number(FLAC__StreamEncoder *encoder, long serial_number)
FLAC__stream_encoder_get_blocksize
uint32_t FLAC__stream_encoder_get_blocksize(const FLAC__StreamEncoder *encoder)
FLAC__StreamEncoderTellStatusString
const char *const FLAC__StreamEncoderTellStatusString[]
FLAC__stream_encoder_get_resolved_state_string
const char * FLAC__stream_encoder_get_resolved_state_string(const FLAC__StreamEncoder *encoder)
FLAC__STREAM_ENCODER_READ_STATUS_CONTINUE
@ FLAC__STREAM_ENCODER_READ_STATUS_CONTINUE
Definition stream_encoder.h:369
FLAC__STREAM_ENCODER_READ_STATUS_END_OF_STREAM
@ FLAC__STREAM_ENCODER_READ_STATUS_END_OF_STREAM
Definition stream_encoder.h:372
FLAC__STREAM_ENCODER_READ_STATUS_ABORT
@ FLAC__STREAM_ENCODER_READ_STATUS_ABORT
Definition stream_encoder.h:375
FLAC__STREAM_ENCODER_READ_STATUS_UNSUPPORTED
@ FLAC__STREAM_ENCODER_READ_STATUS_UNSUPPORTED
Definition stream_encoder.h:378
FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR
@ FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR
Definition stream_encoder.h:398
FLAC__STREAM_ENCODER_WRITE_STATUS_OK
@ FLAC__STREAM_ENCODER_WRITE_STATUS_OK
Definition stream_encoder.h:395
FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_NUMBER_OF_CHANNELS
@ FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_NUMBER_OF_CHANNELS
Definition stream_encoder.h:314
FLAC__STREAM_ENCODER_INIT_STATUS_OK
@ FLAC__STREAM_ENCODER_INIT_STATUS_OK
Definition stream_encoder.h:300
FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_MAX_LPC_ORDER
@ FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_MAX_LPC_ORDER
Definition stream_encoder.h:328
FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_QLP_COEFF_PRECISION
@ FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_QLP_COEFF_PRECISION
Definition stream_encoder.h:331
FLAC__STREAM_ENCODER_INIT_STATUS_BLOCK_SIZE_TOO_SMALL_FOR_LPC_ORDER
@ FLAC__STREAM_ENCODER_INIT_STATUS_BLOCK_SIZE_TOO_SMALL_FOR_LPC_ORDER
Definition stream_encoder.h:334
FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BLOCK_SIZE
@ FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BLOCK_SIZE
Definition stream_encoder.h:325
FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_SAMPLE_RATE
@ FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_SAMPLE_RATE
Definition stream_encoder.h:322
FLAC__STREAM_ENCODER_INIT_STATUS_UNSUPPORTED_CONTAINER
@ FLAC__STREAM_ENCODER_INIT_STATUS_UNSUPPORTED_CONTAINER
Definition stream_encoder.h:306
FLAC__STREAM_ENCODER_INIT_STATUS_ENCODER_ERROR
@ FLAC__STREAM_ENCODER_INIT_STATUS_ENCODER_ERROR
Definition stream_encoder.h:303
FLAC__STREAM_ENCODER_INIT_STATUS_NOT_STREAMABLE
@ FLAC__STREAM_ENCODER_INIT_STATUS_NOT_STREAMABLE
Definition stream_encoder.h:337
FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_METADATA
@ FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_METADATA
Definition stream_encoder.h:340
FLAC__STREAM_ENCODER_INIT_STATUS_ALREADY_INITIALIZED
@ FLAC__STREAM_ENCODER_INIT_STATUS_ALREADY_INITIALIZED
Definition stream_encoder.h:349
FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_CALLBACKS
@ FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_CALLBACKS
Definition stream_encoder.h:311
FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BITS_PER_SAMPLE
@ FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BITS_PER_SAMPLE
Definition stream_encoder.h:317
FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED
@ FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED
Definition stream_encoder.h:421
FLAC__STREAM_ENCODER_SEEK_STATUS_OK
@ FLAC__STREAM_ENCODER_SEEK_STATUS_OK
Definition stream_encoder.h:415
FLAC__STREAM_ENCODER_SEEK_STATUS_ERROR
@ FLAC__STREAM_ENCODER_SEEK_STATUS_ERROR
Definition stream_encoder.h:418
FLAC__STREAM_ENCODER_TELL_STATUS_OK
@ FLAC__STREAM_ENCODER_TELL_STATUS_OK
Definition stream_encoder.h:438
FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED
@ FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED
Definition stream_encoder.h:444
FLAC__STREAM_ENCODER_TELL_STATUS_ERROR
@ FLAC__STREAM_ENCODER_TELL_STATUS_ERROR
Definition stream_encoder.h:441
FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA
@ FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA
Definition stream_encoder.h:260
FLAC__STREAM_ENCODER_UNINITIALIZED
@ FLAC__STREAM_ENCODER_UNINITIALIZED
Definition stream_encoder.h:246
FLAC__STREAM_ENCODER_FRAMING_ERROR
@ FLAC__STREAM_ENCODER_FRAMING_ERROR
Definition stream_encoder.h:273
FLAC__STREAM_ENCODER_MEMORY_ALLOCATION_ERROR
@ FLAC__STREAM_ENCODER_MEMORY_ALLOCATION_ERROR
Definition stream_encoder.h:278
FLAC__STREAM_ENCODER_OK
@ FLAC__STREAM_ENCODER_OK
Definition stream_encoder.h:243
FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR
@ FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR
Definition stream_encoder.h:255
FLAC__STREAM_ENCODER_CLIENT_ERROR
@ FLAC__STREAM_ENCODER_CLIENT_ERROR
Definition stream_encoder.h:265
FLAC__STREAM_ENCODER_OGG_ERROR
@ FLAC__STREAM_ENCODER_OGG_ERROR
Definition stream_encoder.h:252
FLAC__STREAM_ENCODER_IO_ERROR
@ FLAC__STREAM_ENCODER_IO_ERROR
Definition stream_encoder.h:268
stream_decoder.h
This module contains the functions which implement the stream decoder.
FLAC__StreamEncoder
Definition stream_encoder.h:469
FLAC__StreamMetadata
Definition format.h:841

Copyright (c) 2000-2009 Josh Coalson Copyright (c) 2011-2025 Xiph.Org Foundation