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

# include/FLAC/seekable_stream_decoder.h

Go to the documentation of this file.

    00001 /* libFLAC - Free Lossless Audio Codec library
    00002  * Copyright (C) 2000,2001,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_DECODER_H
    00021 #define FLAC__SEEKABLE_STREAM_DECODER_H
    00022
    00023 #include "export.h"
    00024 #include "stream_decoder.h"
    00025
    00026 #ifdef __cplusplus
    00027 extern "C" {
    00028 #endif
    00029
    00030
    00120 typedef enum {
    00121
    00122     FLAC__SEEKABLE_STREAM_DECODER_OK = 0,
    00125     FLAC__SEEKABLE_STREAM_DECODER_SEEKING,
    00128     FLAC__SEEKABLE_STREAM_DECODER_END_OF_STREAM,
    00131     FLAC__SEEKABLE_STREAM_DECODER_MEMORY_ALLOCATION_ERROR,
    00134     FLAC__SEEKABLE_STREAM_DECODER_STREAM_DECODER_ERROR,
    00137     FLAC__SEEKABLE_STREAM_DECODER_READ_ERROR,
    00140     FLAC__SEEKABLE_STREAM_DECODER_SEEK_ERROR,
    00145     FLAC__SEEKABLE_STREAM_DECODER_ALREADY_INITIALIZED,
    00151     FLAC__SEEKABLE_STREAM_DECODER_INVALID_CALLBACK,
    00156     FLAC__SEEKABLE_STREAM_DECODER_UNINITIALIZED
    00159 } FLAC__SeekableStreamDecoderState;
    00160
    00166 extern FLAC_API const char * const FLAC__SeekableStreamDecoderStateString[];
    00167
    00168
    00171 typedef enum {
    00172
    00173     FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_OK,
    00176     FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR
    00179 } FLAC__SeekableStreamDecoderReadStatus;
    00180
    00186 extern FLAC_API const char * const FLAC__SeekableStreamDecoderReadStatusString[];
    00187
    00188
    00191 typedef enum {
    00192
    00193     FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_OK,
    00196     FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_ERROR
    00199 } FLAC__SeekableStreamDecoderSeekStatus;
    00200
    00206 extern FLAC_API const char * const FLAC__SeekableStreamDecoderSeekStatusString[];
    00207
    00208
    00211 typedef enum {
    00212
    00213     FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_OK,
    00216     FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_ERROR
    00219 } FLAC__SeekableStreamDecoderTellStatus;
    00220
    00226 extern FLAC_API const char * const FLAC__SeekableStreamDecoderTellStatusString[];
    00227
    00228
    00231 typedef enum {
    00232
    00233     FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_OK,
    00236     FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR
    00239 } FLAC__SeekableStreamDecoderLengthStatus;
    00240
    00246 extern FLAC_API const char * const FLAC__SeekableStreamDecoderLengthStatusString[];
    00247
    00248
    00249 /***********************************************************************
    00250  *
    00251  * class FLAC__SeekableStreamDecoder : public FLAC__StreamDecoder
    00252  *
    00253  ***********************************************************************/
    00254
    00255 struct FLAC__SeekableStreamDecoderProtected;
    00256 struct FLAC__SeekableStreamDecoderPrivate;
    00262 typedef struct {
    00263     struct FLAC__SeekableStreamDecoderProtected *protected_; /* avoid the C++ keyword 'protected' */
    00264     struct FLAC__SeekableStreamDecoderPrivate *private_; /* avoid the C++ keyword 'private' */
    00265 } FLAC__SeekableStreamDecoder;
    00266
    00280 typedef FLAC__SeekableStreamDecoderReadStatus (*FLAC__SeekableStreamDecoderReadCallback)(const FLAC__SeekableStreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data);
    00281
    00293 typedef FLAC__SeekableStreamDecoderSeekStatus (*FLAC__SeekableStreamDecoderSeekCallback)(const FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 absolute_byte_offset, void *client_data);
    00294
    00306 typedef FLAC__SeekableStreamDecoderTellStatus (*FLAC__SeekableStreamDecoderTellCallback)(const FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 *absolute_byte_offset, void *client_data);
    00307
    00319 typedef FLAC__SeekableStreamDecoderLengthStatus (*FLAC__SeekableStreamDecoderLengthCallback)(const FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 *stream_length, void *client_data);
    00320
    00330 typedef FLAC__bool (*FLAC__SeekableStreamDecoderEofCallback)(const FLAC__SeekableStreamDecoder *decoder, void *client_data);
    00331
    00344 typedef FLAC__StreamDecoderWriteStatus (*FLAC__SeekableStreamDecoderWriteCallback)(const FLAC__SeekableStreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data);
    00345
    00355 typedef void (*FLAC__SeekableStreamDecoderMetadataCallback)(const FLAC__SeekableStreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data);
    00356
    00366 typedef void (*FLAC__SeekableStreamDecoderErrorCallback)(const FLAC__SeekableStreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data);
    00367
    00368
    00369 /***********************************************************************
    00370  *
    00371  * Class constructor/destructor
    00372  *
    00373  ***********************************************************************/
    00374
    00383 FLAC_API FLAC__SeekableStreamDecoder *FLAC__seekable_stream_decoder_new();
    00384
    00391 FLAC_API void FLAC__seekable_stream_decoder_delete(FLAC__SeekableStreamDecoder *decoder);
    00392
    00393
    00394 /***********************************************************************
    00395  *
    00396  * Public class method prototypes
    00397  *
    00398  ***********************************************************************/
    00399
    00417 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_md5_checking(FLAC__SeekableStreamDecoder *decoder, FLAC__bool value);
    00418
    00435 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_read_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderReadCallback value);
    00436
    00454 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_seek_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderSeekCallback value);
    00455
    00473 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_tell_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderTellCallback value);
    00474
    00491 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_length_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderLengthCallback value);
    00492
    00509 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_eof_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderEofCallback value);
    00510
    00527 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_write_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderWriteCallback value);
    00528
    00545 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderMetadataCallback value);
    00546
    00563 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_error_callback(FLAC__SeekableStreamDecoder *decoder, FLAC__SeekableStreamDecoderErrorCallback value);
    00564
    00577 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_client_data(FLAC__SeekableStreamDecoder *decoder, void *value);
    00578
    00592 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond(FLAC__SeekableStreamDecoder *decoder, FLAC__MetadataType type);
    00593
    00607 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond_application(FLAC__SeekableStreamDecoder *decoder, const FLAC__byte id[4]);
    00608
    00620 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_respond_all(FLAC__SeekableStreamDecoder *decoder);
    00621
    00635 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore(FLAC__SeekableStreamDecoder *decoder, FLAC__MetadataType type);
    00636
    00650 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore_application(FLAC__SeekableStreamDecoder *decoder, const FLAC__byte id[4]);
    00651
    00663 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_set_metadata_ignore_all(FLAC__SeekableStreamDecoder *decoder);
    00664
    00673 FLAC_API FLAC__SeekableStreamDecoderState FLAC__seekable_stream_decoder_get_state(const FLAC__SeekableStreamDecoder *decoder);
    00674
    00685 FLAC_API FLAC__StreamDecoderState FLAC__seekable_stream_decoder_get_stream_decoder_state(const FLAC__SeekableStreamDecoder *decoder);
    00686
    00698 FLAC_API const char *FLAC__seekable_stream_decoder_get_resolved_state_string(const FLAC__SeekableStreamDecoder *decoder);
    00699
    00712 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_get_md5_checking(const FLAC__SeekableStreamDecoder *decoder);
    00713
    00723 FLAC_API unsigned FLAC__seekable_stream_decoder_get_channels(const FLAC__SeekableStreamDecoder *decoder);
    00724
    00734 FLAC_API FLAC__ChannelAssignment FLAC__seekable_stream_decoder_get_channel_assignment(const FLAC__SeekableStreamDecoder *decoder);
    00735
    00745 FLAC_API unsigned FLAC__seekable_stream_decoder_get_bits_per_sample(const FLAC__SeekableStreamDecoder *decoder);
    00746
    00756 FLAC_API unsigned FLAC__seekable_stream_decoder_get_sample_rate(const FLAC__SeekableStreamDecoder *decoder);
    00757
    00767 FLAC_API unsigned FLAC__seekable_stream_decoder_get_blocksize(const FLAC__SeekableStreamDecoder *decoder);
    00768
    00784 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_get_decode_position(const FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 *position);
    00785
    00801 FLAC_API FLAC__SeekableStreamDecoderState FLAC__seekable_stream_decoder_init(FLAC__SeekableStreamDecoder *decoder);
    00802
    00823 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_finish(FLAC__SeekableStreamDecoder *decoder);
    00824
    00837 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_flush(FLAC__SeekableStreamDecoder *decoder);
    00838
    00854 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_reset(FLAC__SeekableStreamDecoder *decoder);
    00855
    00865 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_process_single(FLAC__SeekableStreamDecoder *decoder);
    00866
    00876 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_process_until_end_of_metadata(FLAC__SeekableStreamDecoder *decoder);
    00877
    00887 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_process_until_end_of_stream(FLAC__SeekableStreamDecoder *decoder);
    00888
    00900 FLAC_API FLAC__bool FLAC__seekable_stream_decoder_seek_absolute(FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 sample);
    00901
    00902 /* \} */
    00903
    00904 #ifdef __cplusplus
    00905 }
    00906 #endif
    00907
    00908 #endif