include/FLAC/seekable_stream_encoder.h Source File

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

# include/FLAC/seekable_stream_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__SEEKABLE_STREAM_ENCODER_H
    00021 #define FLAC__SEEKABLE_STREAM_ENCODER_H
    00022
    00023 #include "stream_encoder.h"
    00024
    00025 #ifdef __cplusplus
    00026 extern "C" {
    00027 #endif
    00028
    00029
    00103 typedef enum {
    00104
    00105     FLAC__SEEKABLE_STREAM_ENCODER_OK = 0,
    00108     FLAC__SEEKABLE_STREAM_ENCODER_STREAM_ENCODER_ERROR,
    00113     FLAC__SEEKABLE_STREAM_ENCODER_MEMORY_ALLOCATION_ERROR,
    00116     FLAC__SEEKABLE_STREAM_ENCODER_WRITE_ERROR,
    00119     FLAC__SEEKABLE_STREAM_ENCODER_READ_ERROR,
    00122     FLAC__SEEKABLE_STREAM_ENCODER_SEEK_ERROR,
    00125     FLAC__SEEKABLE_STREAM_ENCODER_ALREADY_INITIALIZED,
    00131     FLAC__SEEKABLE_STREAM_ENCODER_INVALID_CALLBACK,
    00136     FLAC__SEEKABLE_STREAM_ENCODER_INVALID_SEEKTABLE,
    00141     FLAC__SEEKABLE_STREAM_ENCODER_UNINITIALIZED
    00144 } FLAC__SeekableStreamEncoderState;
    00145
    00151 extern const char * const FLAC__SeekableStreamEncoderStateString[];
    00152
    00153
    00156 typedef enum {
    00157
    00158     FLAC__SEEKABLE_STREAM_ENCODER_SEEK_STATUS_OK,
    00161     FLAC__SEEKABLE_STREAM_ENCODER_SEEK_STATUS_ERROR
    00164 } FLAC__SeekableStreamEncoderSeekStatus;
    00165
    00171 extern const char * const FLAC__SeekableStreamEncoderSeekStatusString[];
    00172
    00173
    00174 /***********************************************************************
    00175  *
    00176  * class FLAC__SeekableStreamEncoder
    00177  *
    00178  ***********************************************************************/
    00179
    00180 struct FLAC__SeekableStreamEncoderProtected;
    00181 struct FLAC__SeekableStreamEncoderPrivate;
    00186 typedef struct {
    00187     struct FLAC__SeekableStreamEncoderProtected *protected_; /* avoid the C++ keyword 'protected' */
    00188     struct FLAC__SeekableStreamEncoderPrivate *private_; /* avoid the C++ keyword 'private' */
    00189 } FLAC__SeekableStreamEncoder;
    00190
    00202 typedef FLAC__SeekableStreamEncoderSeekStatus (*FLAC__SeekableStreamEncoderSeekCallback)(const FLAC__SeekableStreamEncoder *encoder, FLAC__uint64 absolute_byte_offset, void *client_data);
    00203
    00220 typedef FLAC__StreamEncoderWriteStatus (*FLAC__SeekableStreamEncoderWriteCallback)(const FLAC__SeekableStreamEncoder *encoder, const FLAC__byte buffer[], unsigned bytes, unsigned samples, unsigned current_frame, void *client_data);
    00221
    00222
    00223 /***********************************************************************
    00224  *
    00225  * Class constructor/destructor
    00226  *
    00227  ***********************************************************************/
    00228
    00236 FLAC__SeekableStreamEncoder *FLAC__seekable_stream_encoder_new();
    00237
    00244 void FLAC__seekable_stream_encoder_delete(FLAC__SeekableStreamEncoder *encoder);
    00245
    00246 /***********************************************************************
    00247  *
    00248  * Public class method prototypes
    00249  *
    00250  ***********************************************************************/
    00251
    00263 FLAC__bool FLAC__seekable_stream_encoder_set_verify(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value);
    00264
    00276 FLAC__bool FLAC__seekable_stream_encoder_set_streamable_subset(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value);
    00277
    00289 FLAC__bool FLAC__seekable_stream_encoder_set_do_mid_side_stereo(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value);
    00290
    00302 FLAC__bool FLAC__seekable_stream_encoder_set_loose_mid_side_stereo(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value);
    00303
    00315 FLAC__bool FLAC__seekable_stream_encoder_set_channels(FLAC__SeekableStreamEncoder *encoder, unsigned value);
    00316
    00332 FLAC__bool FLAC__seekable_stream_encoder_set_bits_per_sample(FLAC__SeekableStreamEncoder *encoder, unsigned value);
    00333
    00345 FLAC__bool FLAC__seekable_stream_encoder_set_sample_rate(FLAC__SeekableStreamEncoder *encoder, unsigned value);
    00346
    00358 FLAC__bool FLAC__seekable_stream_encoder_set_blocksize(FLAC__SeekableStreamEncoder *encoder, unsigned value);
    00359
    00371 FLAC__bool FLAC__seekable_stream_encoder_set_max_lpc_order(FLAC__SeekableStreamEncoder *encoder, unsigned value);
    00372
    00388 FLAC__bool FLAC__seekable_stream_encoder_set_qlp_coeff_precision(FLAC__SeekableStreamEncoder *encoder, unsigned value);
    00389
    00401 FLAC__bool FLAC__seekable_stream_encoder_set_do_qlp_coeff_prec_search(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value);
    00402
    00414 FLAC__bool FLAC__seekable_stream_encoder_set_do_escape_coding(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value);
    00415
    00427 FLAC__bool FLAC__seekable_stream_encoder_set_do_exhaustive_model_search(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value);
    00428
    00440 FLAC__bool FLAC__seekable_stream_encoder_set_min_residual_partition_order(FLAC__SeekableStreamEncoder *encoder, unsigned value);
    00441
    00453 FLAC__bool FLAC__seekable_stream_encoder_set_max_residual_partition_order(FLAC__SeekableStreamEncoder *encoder, unsigned value);
    00454
    00466 FLAC__bool FLAC__seekable_stream_encoder_set_rice_parameter_search_dist(FLAC__SeekableStreamEncoder *encoder, unsigned value);
    00467
    00479 FLAC__bool FLAC__seekable_stream_encoder_set_total_samples_estimate(FLAC__SeekableStreamEncoder *encoder, FLAC__uint64 value);
    00480
    00511 FLAC__bool FLAC__seekable_stream_encoder_set_metadata(FLAC__SeekableStreamEncoder *encoder, FLAC__StreamMetadata **metadata, unsigned num_blocks);
    00512
    00530 FLAC__bool FLAC__seekable_stream_encoder_set_seek_callback(FLAC__SeekableStreamEncoder *encoder, FLAC__SeekableStreamEncoderSeekCallback value);
    00531
    00548 FLAC__bool FLAC__seekable_stream_encoder_set_write_callback(FLAC__SeekableStreamEncoder *encoder, FLAC__SeekableStreamEncoderWriteCallback value);
    00549
    00562 FLAC__bool FLAC__seekable_stream_encoder_set_client_data(FLAC__SeekableStreamEncoder *encoder, void *value);
    00563
    00572 FLAC__SeekableStreamEncoderState FLAC__seekable_stream_encoder_get_state(const FLAC__SeekableStreamEncoder *encoder);
    00573
    00584 FLAC__StreamEncoderState FLAC__seekable_stream_encoder_get_stream_encoder_state(const FLAC__SeekableStreamEncoder *encoder);
    00585
    00597 FLAC__StreamDecoderState FLAC__seekable_stream_encoder_get_verify_decoder_state(const FLAC__SeekableStreamEncoder *encoder);
    00598
    00617 void FLAC__seekable_stream_encoder_get_verify_decoder_error_stats(const FLAC__SeekableStreamEncoder *encoder, FLAC__uint64 *absolute_sample, unsigned *frame_number, unsigned *channel, unsigned *sample, FLAC__int32 *expected, FLAC__int32 *got);
    00618
    00629 FLAC__bool FLAC__seekable_stream_encoder_get_verify(const FLAC__SeekableStreamEncoder *encoder);
    00630
    00641 FLAC__bool FLAC__seekable_stream_encoder_get_streamable_subset(const FLAC__SeekableStreamEncoder *encoder);
    00642
    00653 FLAC__bool FLAC__seekable_stream_encoder_get_do_mid_side_stereo(const FLAC__SeekableStreamEncoder *encoder);
    00654
    00665 FLAC__bool FLAC__seekable_stream_encoder_get_loose_mid_side_stereo(const FLAC__SeekableStreamEncoder *encoder);
    00666
    00677 unsigned FLAC__seekable_stream_encoder_get_channels(const FLAC__SeekableStreamEncoder *encoder);
    00678
    00689 unsigned FLAC__seekable_stream_encoder_get_bits_per_sample(const FLAC__SeekableStreamEncoder *encoder);
    00690
    00701 unsigned FLAC__seekable_stream_encoder_get_sample_rate(const FLAC__SeekableStreamEncoder *encoder);
    00702
    00713 unsigned FLAC__seekable_stream_encoder_get_blocksize(const FLAC__SeekableStreamEncoder *encoder);
    00714
    00725 unsigned FLAC__seekable_stream_encoder_get_max_lpc_order(const FLAC__SeekableStreamEncoder *encoder);
    00726
    00737 unsigned FLAC__seekable_stream_encoder_get_qlp_coeff_precision(const FLAC__SeekableStreamEncoder *encoder);
    00738
    00749 FLAC__bool FLAC__seekable_stream_encoder_get_do_qlp_coeff_prec_search(const FLAC__SeekableStreamEncoder *encoder);
    00750
    00761 FLAC__bool FLAC__seekable_stream_encoder_get_do_escape_coding(const FLAC__SeekableStreamEncoder *encoder);
    00762
    00773 FLAC__bool FLAC__seekable_stream_encoder_get_do_exhaustive_model_search(const FLAC__SeekableStreamEncoder *encoder);
    00774
    00785 unsigned FLAC__seekable_stream_encoder_get_min_residual_partition_order(const FLAC__SeekableStreamEncoder *encoder);
    00786
    00797 unsigned FLAC__seekable_stream_encoder_get_max_residual_partition_order(const FLAC__SeekableStreamEncoder *encoder);
    00798
    00809 unsigned FLAC__seekable_stream_encoder_get_rice_parameter_search_dist(const FLAC__SeekableStreamEncoder *encoder);
    00810
    00821 FLAC__uint64 FLAC__seekable_stream_encoder_get_total_samples_estimate(const FLAC__SeekableStreamEncoder *encoder);
    00822
    00841 FLAC__SeekableStreamEncoderState FLAC__seekable_stream_encoder_init(FLAC__SeekableStreamEncoder *encoder);
    00842
    00857 void FLAC__seekable_stream_encoder_finish(FLAC__SeekableStreamEncoder *encoder);
    00858
    00874 FLAC__bool FLAC__seekable_stream_encoder_process(FLAC__SeekableStreamEncoder *encoder, const FLAC__int32 * const buffer[], unsigned samples);
    00875
    00894 FLAC__bool FLAC__seekable_stream_encoder_process_interleaved(FLAC__SeekableStreamEncoder *encoder, const FLAC__int32 buffer[], unsigned samples);
    00895
    00896 /* \} */
    00897
    00898 #ifdef __cplusplus
    00899 }
    00900 #endif
    00901
    00902 #endif