Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

include/FLAC/file_encoder.h

Go to the documentation of this file.
00001 /* libFLAC - Free Lossless Audio Codec library
00002  * Copyright (C) 2002  Josh Coalson
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Library General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Library General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Library General Public
00015  * License along with this library; if not, write to the
00016  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00017  * Boston, MA  02111-1307, USA.
00018  */
00019 
00020 #ifndef FLAC__FILE_ENCODER_H
00021 #define FLAC__FILE_ENCODER_H
00022 
00023 #include "seekable_stream_encoder.h"
00024 
00025 #ifdef __cplusplus
00026 extern "C" {
00027 #endif
00028 
00029 
00092 typedef enum {
00093 
00094     FLAC__FILE_ENCODER_OK = 0,
00097     FLAC__FILE_ENCODER_NO_FILENAME,
00102     FLAC__FILE_ENCODER_SEEKABLE_STREAM_ENCODER_ERROR,
00107     FLAC__FILE_ENCODER_FATAL_ERROR_WHILE_WRITING,
00110     FLAC__FILE_ENCODER_ERROR_OPENING_FILE,
00113     FLAC__FILE_ENCODER_MEMORY_ALLOCATION_ERROR,
00116     FLAC__FILE_ENCODER_ALREADY_INITIALIZED,
00122     FLAC__FILE_ENCODER_UNINITIALIZED
00125 } FLAC__FileEncoderState;
00126 
00132 extern const char * const FLAC__FileEncoderStateString[];
00133 
00134 
00135 /***********************************************************************
00136  *
00137  * class FLAC__FileEncoder
00138  *
00139  ***********************************************************************/
00140 
00141 struct FLAC__FileEncoderProtected;
00142 struct FLAC__FileEncoderPrivate;
00147 typedef struct {
00148     struct FLAC__FileEncoderProtected *protected_; /* avoid the C++ keyword 'protected' */
00149     struct FLAC__FileEncoderPrivate *private_; /* avoid the C++ keyword 'private' */
00150 } FLAC__FileEncoder;
00151 
00164 typedef void (*FLAC__FileEncoderProgressCallback)(const FLAC__FileEncoder *encoder, FLAC__uint64 bytes_written, FLAC__uint64 samples_written, unsigned frames_written, unsigned total_frames_estimate, void *client_data);
00165 
00166 
00167 /***********************************************************************
00168  *
00169  * Class constructor/destructor
00170  *
00171  ***********************************************************************/
00172 
00180 FLAC__FileEncoder *FLAC__file_encoder_new();
00181 
00188 void FLAC__file_encoder_delete(FLAC__FileEncoder *encoder);
00189 
00190 /***********************************************************************
00191  *
00192  * Public class method prototypes
00193  *
00194  ***********************************************************************/
00195 
00207 FLAC__bool FLAC__file_encoder_set_verify(FLAC__FileEncoder *encoder, FLAC__bool value);
00208 
00220 FLAC__bool FLAC__file_encoder_set_streamable_subset(FLAC__FileEncoder *encoder, FLAC__bool value);
00221 
00233 FLAC__bool FLAC__file_encoder_set_do_mid_side_stereo(FLAC__FileEncoder *encoder, FLAC__bool value);
00234 
00246 FLAC__bool FLAC__file_encoder_set_loose_mid_side_stereo(FLAC__FileEncoder *encoder, FLAC__bool value);
00247 
00259 FLAC__bool FLAC__file_encoder_set_channels(FLAC__FileEncoder *encoder, unsigned value);
00260 
00276 FLAC__bool FLAC__file_encoder_set_bits_per_sample(FLAC__FileEncoder *encoder, unsigned value);
00277 
00289 FLAC__bool FLAC__file_encoder_set_sample_rate(FLAC__FileEncoder *encoder, unsigned value);
00290 
00302 FLAC__bool FLAC__file_encoder_set_blocksize(FLAC__FileEncoder *encoder, unsigned value);
00303 
00315 FLAC__bool FLAC__file_encoder_set_max_lpc_order(FLAC__FileEncoder *encoder, unsigned value);
00316 
00332 FLAC__bool FLAC__file_encoder_set_qlp_coeff_precision(FLAC__FileEncoder *encoder, unsigned value);
00333 
00345 FLAC__bool FLAC__file_encoder_set_do_qlp_coeff_prec_search(FLAC__FileEncoder *encoder, FLAC__bool value);
00346 
00358 FLAC__bool FLAC__file_encoder_set_do_escape_coding(FLAC__FileEncoder *encoder, FLAC__bool value);
00359 
00371 FLAC__bool FLAC__file_encoder_set_do_exhaustive_model_search(FLAC__FileEncoder *encoder, FLAC__bool value);
00372 
00384 FLAC__bool FLAC__file_encoder_set_min_residual_partition_order(FLAC__FileEncoder *encoder, unsigned value);
00385 
00397 FLAC__bool FLAC__file_encoder_set_max_residual_partition_order(FLAC__FileEncoder *encoder, unsigned value);
00398 
00410 FLAC__bool FLAC__file_encoder_set_rice_parameter_search_dist(FLAC__FileEncoder *encoder, unsigned value);
00411 
00423 FLAC__bool FLAC__file_encoder_set_total_samples_estimate(FLAC__FileEncoder *encoder, FLAC__uint64 value);
00424 
00437 FLAC__bool FLAC__file_encoder_set_metadata(FLAC__FileEncoder *encoder, FLAC__StreamMetadata **metadata, unsigned num_blocks);
00438 
00458 FLAC__bool FLAC__file_encoder_set_filename(FLAC__FileEncoder *encoder, const char *value);
00459 
00479 FLAC__bool FLAC__file_encoder_set_progress_callback(FLAC__FileEncoder *encoder, FLAC__FileEncoderProgressCallback value);
00480 
00493 FLAC__bool FLAC__file_encoder_set_client_data(FLAC__FileEncoder *encoder, void *value);
00494 
00503 FLAC__FileEncoderState FLAC__file_encoder_get_state(const FLAC__FileEncoder *encoder);
00504 
00515 FLAC__SeekableStreamEncoderState FLAC__file_encoder_get_seekable_stream_encoder_state(const FLAC__FileEncoder *encoder);
00516 
00528 FLAC__StreamEncoderState FLAC__file_encoder_get_stream_encoder_state(const FLAC__FileEncoder *encoder);
00529 
00542 FLAC__StreamDecoderState FLAC__file_encoder_get_verify_decoder_state(const FLAC__FileEncoder *encoder);
00543 
00564 void FLAC__file_encoder_get_verify_decoder_error_stats(const FLAC__FileEncoder *encoder, FLAC__uint64 *absolute_sample, unsigned *frame_number, unsigned *channel, unsigned *sample, FLAC__int32 *expected, FLAC__int32 *got);
00565 
00576 FLAC__bool FLAC__file_encoder_get_verify(const FLAC__FileEncoder *encoder);
00577 
00588 FLAC__bool FLAC__file_encoder_get_streamable_subset(const FLAC__FileEncoder *encoder);
00589 
00600 FLAC__bool FLAC__file_encoder_get_do_mid_side_stereo(const FLAC__FileEncoder *encoder);
00601 
00612 FLAC__bool FLAC__file_encoder_get_loose_mid_side_stereo(const FLAC__FileEncoder *encoder);
00613 
00624 unsigned FLAC__file_encoder_get_channels(const FLAC__FileEncoder *encoder);
00625 
00636 unsigned FLAC__file_encoder_get_bits_per_sample(const FLAC__FileEncoder *encoder);
00637 
00648 unsigned FLAC__file_encoder_get_sample_rate(const FLAC__FileEncoder *encoder);
00649 
00660 unsigned FLAC__file_encoder_get_blocksize(const FLAC__FileEncoder *encoder);
00661 
00672 unsigned FLAC__file_encoder_get_max_lpc_order(const FLAC__FileEncoder *encoder);
00673 
00684 unsigned FLAC__file_encoder_get_qlp_coeff_precision(const FLAC__FileEncoder *encoder);
00685 
00696 FLAC__bool FLAC__file_encoder_get_do_qlp_coeff_prec_search(const FLAC__FileEncoder *encoder);
00697 
00708 FLAC__bool FLAC__file_encoder_get_do_escape_coding(const FLAC__FileEncoder *encoder);
00709 
00720 FLAC__bool FLAC__file_encoder_get_do_exhaustive_model_search(const FLAC__FileEncoder *encoder);
00721 
00732 unsigned FLAC__file_encoder_get_min_residual_partition_order(const FLAC__FileEncoder *encoder);
00733 
00744 unsigned FLAC__file_encoder_get_max_residual_partition_order(const FLAC__FileEncoder *encoder);
00745 
00756 unsigned FLAC__file_encoder_get_rice_parameter_search_dist(const FLAC__FileEncoder *encoder);
00757 
00768 FLAC__uint64 FLAC__file_encoder_get_total_samples_estimate(const FLAC__FileEncoder *encoder);
00769 
00784 FLAC__FileEncoderState FLAC__file_encoder_init(FLAC__FileEncoder *encoder);
00785 
00800 void FLAC__file_encoder_finish(FLAC__FileEncoder *encoder);
00801 
00817 FLAC__bool FLAC__file_encoder_process(FLAC__FileEncoder *encoder, const FLAC__int32 * const buffer[], unsigned samples);
00818 
00837 FLAC__bool FLAC__file_encoder_process_interleaved(FLAC__FileEncoder *encoder, const FLAC__int32 buffer[], unsigned samples);
00838 
00839 /* \} */
00840 
00841 #ifdef __cplusplus
00842 }
00843 #endif
00844 
00845 #endif

Generated on Tue Sep 24 21:17:41 2002 for FLAC by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002