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,2003  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 "export.h"
    00024 #include "stream_encoder.h"
    00025
    00026 #ifdef __cplusplus
    00027 extern "C" {
    00028 #endif
    00029
    00030
    00104 typedef enum {
    00105
    00106     FLAC__SEEKABLE_STREAM_ENCODER_OK = 0,
    00109     FLAC__SEEKABLE_STREAM_ENCODER_STREAM_ENCODER_ERROR,
    00114     FLAC__SEEKABLE_STREAM_ENCODER_MEMORY_ALLOCATION_ERROR,
    00117     FLAC__SEEKABLE_STREAM_ENCODER_WRITE_ERROR,
    00120     FLAC__SEEKABLE_STREAM_ENCODER_READ_ERROR,
    00123     FLAC__SEEKABLE_STREAM_ENCODER_SEEK_ERROR,
    00126     FLAC__SEEKABLE_STREAM_ENCODER_ALREADY_INITIALIZED,
    00132     FLAC__SEEKABLE_STREAM_ENCODER_INVALID_CALLBACK,
    00137     FLAC__SEEKABLE_STREAM_ENCODER_INVALID_SEEKTABLE,
    00142     FLAC__SEEKABLE_STREAM_ENCODER_UNINITIALIZED
    00145 } FLAC__SeekableStreamEncoderState;
    00146
    00152 extern FLAC_API const char * const FLAC__SeekableStreamEncoderStateString[];
    00153
    00154
    00157 typedef enum {
    00158
    00159     FLAC__SEEKABLE_STREAM_ENCODER_SEEK_STATUS_OK,
    00162     FLAC__SEEKABLE_STREAM_ENCODER_SEEK_STATUS_ERROR
    00165 } FLAC__SeekableStreamEncoderSeekStatus;
    00166
    00172 extern FLAC_API const char * const FLAC__SeekableStreamEncoderSeekStatusString[];
    00173
    00174
    00175 /***********************************************************************
    00176  *
    00177  * class FLAC__SeekableStreamEncoder
    00178  *
    00179  ***********************************************************************/
    00180
    00181 struct FLAC__SeekableStreamEncoderProtected;
    00182 struct FLAC__SeekableStreamEncoderPrivate;
    00187 typedef struct {
    00188     struct FLAC__SeekableStreamEncoderProtected *protected_; /* avoid the C++ keyword 'protected' */
    00189     struct FLAC__SeekableStreamEncoderPrivate *private_; /* avoid the C++ keyword 'private' */
    00190 } FLAC__SeekableStreamEncoder;
    00191
    00203 typedef FLAC__SeekableStreamEncoderSeekStatus (*FLAC__SeekableStreamEncoderSeekCallback)(const FLAC__SeekableStreamEncoder *encoder, FLAC__uint64 absolute_byte_offset, void *client_data);
    00204
    00221 typedef FLAC__StreamEncoderWriteStatus (*FLAC__SeekableStreamEncoderWriteCallback)(const FLAC__SeekableStreamEncoder *encoder, const FLAC__byte buffer[], unsigned bytes, unsigned samples, unsigned current_frame, void *client_data);
    00222
    00223
    00224 /***********************************************************************
    00225  *
    00226  * Class constructor/destructor
    00227  *
    00228  ***********************************************************************/
    00229
    00237 FLAC_API FLAC__SeekableStreamEncoder *FLAC__seekable_stream_encoder_new();
    00238
    00245 FLAC_API void FLAC__seekable_stream_encoder_delete(FLAC__SeekableStreamEncoder *encoder);
    00246
    00247 /***********************************************************************
    00248  *
    00249  * Public class method prototypes
    00250  *
    00251  ***********************************************************************/
    00252
    00264 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_verify(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value);
    00265
    00277 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_streamable_subset(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value);
    00278
    00290 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_do_mid_side_stereo(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value);
    00291
    00303 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_loose_mid_side_stereo(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value);
    00304
    00316 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_channels(FLAC__SeekableStreamEncoder *encoder, unsigned value);
    00317
    00333 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_bits_per_sample(FLAC__SeekableStreamEncoder *encoder, unsigned value);
    00334
    00346 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_sample_rate(FLAC__SeekableStreamEncoder *encoder, unsigned value);
    00347
    00359 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_blocksize(FLAC__SeekableStreamEncoder *encoder, unsigned value);
    00360
    00372 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_max_lpc_order(FLAC__SeekableStreamEncoder *encoder, unsigned value);
    00373
    00389 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_qlp_coeff_precision(FLAC__SeekableStreamEncoder *encoder, unsigned value);
    00390
    00402 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_do_qlp_coeff_prec_search(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value);
    00403
    00415 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_do_escape_coding(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value);
    00416
    00428 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_do_exhaustive_model_search(FLAC__SeekableStreamEncoder *encoder, FLAC__bool value);
    00429
    00441 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_min_residual_partition_order(FLAC__SeekableStreamEncoder *encoder, unsigned value);
    00442
    00454 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_max_residual_partition_order(FLAC__SeekableStreamEncoder *encoder, unsigned value);
    00455
    00467 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_rice_parameter_search_dist(FLAC__SeekableStreamEncoder *encoder, unsigned value);
    00468
    00480 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_total_samples_estimate(FLAC__SeekableStreamEncoder *encoder, FLAC__uint64 value);
    00481
    00512 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_metadata(FLAC__SeekableStreamEncoder *encoder, FLAC__StreamMetadata **metadata, unsigned num_blocks);
    00513
    00531 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_seek_callback(FLAC__SeekableStreamEncoder *encoder, FLAC__SeekableStreamEncoderSeekCallback value);
    00532
    00549 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_write_callback(FLAC__SeekableStreamEncoder *encoder, FLAC__SeekableStreamEncoderWriteCallback value);
    00550
    00563 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_set_client_data(FLAC__SeekableStreamEncoder *encoder, void *value);
    00564
    00573 FLAC_API FLAC__SeekableStreamEncoderState FLAC__seekable_stream_encoder_get_state(const FLAC__SeekableStreamEncoder *encoder);
    00574
    00585 FLAC_API FLAC__StreamEncoderState FLAC__seekable_stream_encoder_get_stream_encoder_state(const FLAC__SeekableStreamEncoder *encoder);
    00586
    00598 FLAC_API FLAC__StreamDecoderState FLAC__seekable_stream_encoder_get_verify_decoder_state(const FLAC__SeekableStreamEncoder *encoder);
    00599
    00611 FLAC_API const char *FLAC__seekable_stream_encoder_get_resolved_state_string(const FLAC__SeekableStreamEncoder *encoder);
    00612
    00631 FLAC_API 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);
    00632
    00643 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_get_verify(const FLAC__SeekableStreamEncoder *encoder);
    00644
    00655 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_get_streamable_subset(const FLAC__SeekableStreamEncoder *encoder);
    00656
    00667 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_get_do_mid_side_stereo(const FLAC__SeekableStreamEncoder *encoder);
    00668
    00679 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_get_loose_mid_side_stereo(const FLAC__SeekableStreamEncoder *encoder);
    00680
    00691 FLAC_API unsigned FLAC__seekable_stream_encoder_get_channels(const FLAC__SeekableStreamEncoder *encoder);
    00692
    00703 FLAC_API unsigned FLAC__seekable_stream_encoder_get_bits_per_sample(const FLAC__SeekableStreamEncoder *encoder);
    00704
    00715 FLAC_API unsigned FLAC__seekable_stream_encoder_get_sample_rate(const FLAC__SeekableStreamEncoder *encoder);
    00716
    00727 FLAC_API unsigned FLAC__seekable_stream_encoder_get_blocksize(const FLAC__SeekableStreamEncoder *encoder);
    00728
    00739 FLAC_API unsigned FLAC__seekable_stream_encoder_get_max_lpc_order(const FLAC__SeekableStreamEncoder *encoder);
    00740
    00751 FLAC_API unsigned FLAC__seekable_stream_encoder_get_qlp_coeff_precision(const FLAC__SeekableStreamEncoder *encoder);
    00752
    00763 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_get_do_qlp_coeff_prec_search(const FLAC__SeekableStreamEncoder *encoder);
    00764
    00775 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_get_do_escape_coding(const FLAC__SeekableStreamEncoder *encoder);
    00776
    00787 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_get_do_exhaustive_model_search(const FLAC__SeekableStreamEncoder *encoder);
    00788
    00799 FLAC_API unsigned FLAC__seekable_stream_encoder_get_min_residual_partition_order(const FLAC__SeekableStreamEncoder *encoder);
    00800
    00811 FLAC_API unsigned FLAC__seekable_stream_encoder_get_max_residual_partition_order(const FLAC__SeekableStreamEncoder *encoder);
    00812
    00823 FLAC_API unsigned FLAC__seekable_stream_encoder_get_rice_parameter_search_dist(const FLAC__SeekableStreamEncoder *encoder);
    00824
    00835 FLAC_API FLAC__uint64 FLAC__seekable_stream_encoder_get_total_samples_estimate(const FLAC__SeekableStreamEncoder *encoder);
    00836
    00855 FLAC_API FLAC__SeekableStreamEncoderState FLAC__seekable_stream_encoder_init(FLAC__SeekableStreamEncoder *encoder);
    00856
    00871 FLAC_API void FLAC__seekable_stream_encoder_finish(FLAC__SeekableStreamEncoder *encoder);
    00872
    00888 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_process(FLAC__SeekableStreamEncoder *encoder, const FLAC__int32 * const buffer[], unsigned samples);
    00889
    00908 FLAC_API FLAC__bool FLAC__seekable_stream_encoder_process_interleaved(FLAC__SeekableStreamEncoder *encoder, const FLAC__int32 buffer[], unsigned samples);
    00909
    00910 /* \} */
    00911
    00912 #ifdef __cplusplus
    00913 }
    00914 #endif
    00915
    00916 #endif