LMMS
Loading...
Searching...
No Matches
stream_decoder.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-2014 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_DECODER_H
34#define FLAC__STREAM_DECODER_H
35
36#include "export.h"
37#include "format.h"
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43
53
71
195
196
244
250extern FLAC_API const char * const FLAC__StreamDecoderStateString[];
251
252
282
288extern FLAC_API const char * const FLAC__StreamDecoderInitStatusString[];
289
290
313
319extern FLAC_API const char * const FLAC__StreamDecoderReadStatusString[];
320
321
336
342extern FLAC_API const char * const FLAC__StreamDecoderSeekStatusString[];
343
344
359
365extern FLAC_API const char * const FLAC__StreamDecoderTellStatusString[];
366
367
382
388extern FLAC_API const char * const FLAC__StreamDecoderLengthStatusString[];
389
390
402
408extern FLAC_API const char * const FLAC__StreamDecoderWriteStatusString[];
409
410
441
447extern FLAC_API const char * const FLAC__StreamDecoderErrorStatusString[];
448
449
450/***********************************************************************
451 *
452 * class FLAC__StreamDecoder
453 *
454 ***********************************************************************/
455
462typedef struct {
463 struct FLAC__StreamDecoderProtected *protected_; /* avoid the C++ keyword 'protected' */
464 struct FLAC__StreamDecoderPrivate *private_; /* avoid the C++ keyword 'private' */
466
517
552
590
628
655
683
710
727
728
729/***********************************************************************
730 *
731 * Class constructor/destructor
732 *
733 ***********************************************************************/
734
743
751
752
753/***********************************************************************
754 *
755 * Public class method prototypes
756 *
757 ***********************************************************************/
758
776
798
812
827
839
853
868
880
890
900
914
926
938
950
962
974
986
1007
1073 FLAC__StreamDecoder *decoder,
1082 void *client_data
1083);
1084
1154 FLAC__StreamDecoder *decoder,
1163 void *client_data
1164);
1165
1204 FLAC__StreamDecoder *decoder,
1205 FILE *file,
1209 void *client_data
1210);
1211
1254 FLAC__StreamDecoder *decoder,
1255 FILE *file,
1259 void *client_data
1260);
1261
1296 FLAC__StreamDecoder *decoder,
1297 const char *filename,
1301 void *client_data
1302);
1303
1342 FLAC__StreamDecoder *decoder,
1343 const char *filename,
1347 void *client_data
1348);
1349
1370
1385
1418
1451
1472
1493
1534
1552
1553/* \} */
1554
1555#ifdef __cplusplus
1556}
1557#endif
1558
1559#endif
CAdPlugDatabase::CRecord::RecordType type
Definition adplugdb.cpp:93
static char filename[]
Definition features.c:5
static PuglViewHint int value
Definition pugl.h:1708
#define FLAC_API
Definition export.h:73
FLAC__ChannelAssignment
Definition format.h:381
FLAC__MetadataType
Definition format.h:489
FLAC_API FLAC__bool FLAC__stream_decoder_flush(FLAC__StreamDecoder *decoder)
Definition stream_decoder.c:934
FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_ignore(FLAC__StreamDecoder *decoder, FLAC__MetadataType type)
Definition stream_decoder.c:794
FLAC_API FLAC__bool FLAC__stream_decoder_get_decode_position(const FLAC__StreamDecoder *decoder, FLAC__uint64 *position)
Definition stream_decoder.c:912
FLAC__StreamDecoderErrorStatus
Definition stream_decoder.h:426
FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_respond(FLAC__StreamDecoder *decoder, FLAC__MetadataType type)
Definition stream_decoder.c:735
FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_file(FLAC__StreamDecoder *decoder, const char *filename, FLAC__StreamDecoderWriteCallback write_callback, FLAC__StreamDecoderMetadataCallback metadata_callback, FLAC__StreamDecoderErrorCallback error_callback, void *client_data)
struct FLAC__StreamDecoderProtected * protected_
Definition stream_decoder.h:463
FLAC_API FLAC__bool FLAC__stream_decoder_reset(FLAC__StreamDecoder *decoder)
Definition stream_decoder.c:957
FLAC__StreamDecoderReadStatus(* FLAC__StreamDecoderReadCallback)(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data)
Definition stream_decoder.h:516
FLAC_API unsigned FLAC__stream_decoder_get_bits_per_sample(const FLAC__StreamDecoder *decoder)
Definition stream_decoder.c:891
FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_stream(FLAC__StreamDecoder *decoder, FLAC__StreamDecoderReadCallback read_callback, FLAC__StreamDecoderSeekCallback seek_callback, FLAC__StreamDecoderTellCallback tell_callback, FLAC__StreamDecoderLengthCallback length_callback, FLAC__StreamDecoderEofCallback eof_callback, FLAC__StreamDecoderWriteCallback write_callback, FLAC__StreamDecoderMetadataCallback metadata_callback, FLAC__StreamDecoderErrorCallback error_callback, void *client_data)
Definition stream_decoder.c:459
FLAC_API const char *const FLAC__StreamDecoderInitStatusString[]
Definition stream_decoder.c:200
FLAC_API FLAC__bool FLAC__stream_decoder_skip_single_frame(FLAC__StreamDecoder *decoder)
Definition stream_decoder.c:1115
FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_FILE(FLAC__StreamDecoder *decoder, FILE *file, FLAC__StreamDecoderWriteCallback write_callback, FLAC__StreamDecoderMetadataCallback metadata_callback, FLAC__StreamDecoderErrorCallback error_callback, void *client_data)
struct FLAC__StreamDecoderPrivate * private_
Definition stream_decoder.h:464
FLAC__StreamDecoderState
Definition stream_decoder.h:201
FLAC_API FLAC__bool FLAC__stream_decoder_get_md5_checking(const FLAC__StreamDecoder *decoder)
Definition stream_decoder.c:863
FLAC_API unsigned FLAC__stream_decoder_get_channels(const FLAC__StreamDecoder *decoder)
Definition stream_decoder.c:877
FLAC_API const char *const FLAC__StreamDecoderLengthStatusString[]
Definition stream_decoder.c:227
FLAC_API FLAC__bool FLAC__stream_decoder_process_until_end_of_stream(FLAC__StreamDecoder *decoder)
Definition stream_decoder.c:1081
FLAC_API FLAC__bool FLAC__stream_decoder_set_md5_checking(FLAC__StreamDecoder *decoder, FLAC__bool value)
Definition stream_decoder.c:725
FLAC_API const char * FLAC__stream_decoder_get_resolved_state_string(const FLAC__StreamDecoder *decoder)
Definition stream_decoder.c:858
FLAC__StreamDecoderSeekStatus(* FLAC__StreamDecoderSeekCallback)(const FLAC__StreamDecoder *decoder, FLAC__uint64 absolute_byte_offset, void *client_data)
Definition stream_decoder.h:551
FLAC__bool(* FLAC__StreamDecoderEofCallback)(const FLAC__StreamDecoder *decoder, void *client_data)
Definition stream_decoder.h:654
FLAC__StreamDecoderLengthStatus(* FLAC__StreamDecoderLengthCallback)(const FLAC__StreamDecoder *decoder, FLAC__uint64 *stream_length, void *client_data)
Definition stream_decoder.h:627
FLAC_API FLAC__StreamDecoderState FLAC__stream_decoder_get_state(const FLAC__StreamDecoder *decoder)
Definition stream_decoder.c:851
FLAC_API FLAC__bool FLAC__stream_decoder_seek_absolute(FLAC__StreamDecoder *decoder, FLAC__uint64 sample)
Definition stream_decoder.c:1146
FLAC_API FLAC__bool FLAC__stream_decoder_process_until_end_of_metadata(FLAC__StreamDecoder *decoder)
Definition stream_decoder.c:1054
FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_ogg_file(FLAC__StreamDecoder *decoder, const char *filename, FLAC__StreamDecoderWriteCallback write_callback, FLAC__StreamDecoderMetadataCallback metadata_callback, FLAC__StreamDecoderErrorCallback error_callback, void *client_data)
FLAC__StreamDecoderWriteStatus(* FLAC__StreamDecoderWriteCallback)(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 *const buffer[], void *client_data)
Definition stream_decoder.h:682
FLAC_API FLAC__uint64 FLAC__stream_decoder_get_total_samples(const FLAC__StreamDecoder *decoder)
Definition stream_decoder.c:870
void(* FLAC__StreamDecoderMetadataCallback)(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data)
Definition stream_decoder.h:709
FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_ignore_all(FLAC__StreamDecoder *decoder)
Definition stream_decoder.c:839
FLAC__StreamDecoderWriteStatus
Definition stream_decoder.h:393
FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_ogg_stream(FLAC__StreamDecoder *decoder, FLAC__StreamDecoderReadCallback read_callback, FLAC__StreamDecoderSeekCallback seek_callback, FLAC__StreamDecoderTellCallback tell_callback, FLAC__StreamDecoderLengthCallback length_callback, FLAC__StreamDecoderEofCallback eof_callback, FLAC__StreamDecoderWriteCallback write_callback, FLAC__StreamDecoderMetadataCallback metadata_callback, FLAC__StreamDecoderErrorCallback error_callback, void *client_data)
Definition stream_decoder.c:487
FLAC_API FLAC__bool FLAC__stream_decoder_set_ogg_serial_number(FLAC__StreamDecoder *decoder, long serial_number)
Definition stream_decoder.c:708
FLAC__StreamDecoderTellStatus
Definition stream_decoder.h:347
FLAC_API unsigned FLAC__stream_decoder_get_sample_rate(const FLAC__StreamDecoder *decoder)
Definition stream_decoder.c:898
FLAC_API FLAC__bool FLAC__stream_decoder_process_single(FLAC__StreamDecoder *decoder)
Definition stream_decoder.c:1017
FLAC_API FLAC__StreamDecoder * FLAC__stream_decoder_new(void)
Definition stream_decoder.c:250
FLAC_API const char *const FLAC__StreamDecoderTellStatusString[]
Definition stream_decoder.c:221
FLAC_API unsigned FLAC__stream_decoder_get_blocksize(const FLAC__StreamDecoder *decoder)
Definition stream_decoder.c:905
FLAC_API FLAC__bool FLAC__stream_decoder_finish(FLAC__StreamDecoder *decoder)
Definition stream_decoder.c:642
FLAC__StreamDecoderInitStatus
Definition stream_decoder.h:255
FLAC_API void FLAC__stream_decoder_delete(FLAC__StreamDecoder *decoder)
Definition stream_decoder.c:313
FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_respond_application(FLAC__StreamDecoder *decoder, const FLAC__byte id[4])
Definition stream_decoder.c:752
FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_ignore_application(FLAC__StreamDecoder *decoder, const FLAC__byte id[4])
Definition stream_decoder.c:811
FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_ogg_FILE(FLAC__StreamDecoder *decoder, FILE *file, FLAC__StreamDecoderWriteCallback write_callback, FLAC__StreamDecoderMetadataCallback metadata_callback, FLAC__StreamDecoderErrorCallback error_callback, void *client_data)
FLAC_API const char *const FLAC__StreamDecoderSeekStatusString[]
Definition stream_decoder.c:215
void(* FLAC__StreamDecoderErrorCallback)(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)
Definition stream_decoder.h:726
FLAC__StreamDecoderSeekStatus
Definition stream_decoder.h:324
FLAC__StreamDecoderLengthStatus
Definition stream_decoder.h:370
FLAC_API FLAC__ChannelAssignment FLAC__stream_decoder_get_channel_assignment(const FLAC__StreamDecoder *decoder)
Definition stream_decoder.c:884
FLAC__StreamDecoderReadStatus
Definition stream_decoder.h:293
FLAC_API const char *const FLAC__StreamDecoderReadStatusString[]
Definition stream_decoder.c:209
FLAC_API const char *const FLAC__StreamDecoderErrorStatusString[]
Definition stream_decoder.c:238
FLAC_API const char *const FLAC__StreamDecoderWriteStatusString[]
Definition stream_decoder.c:233
FLAC_API const char *const FLAC__StreamDecoderStateString[]
Definition stream_decoder.c:187
FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_respond_all(FLAC__StreamDecoder *decoder)
Definition stream_decoder.c:780
FLAC__StreamDecoderTellStatus(* FLAC__StreamDecoderTellCallback)(const FLAC__StreamDecoder *decoder, FLAC__uint64 *absolute_byte_offset, void *client_data)
Definition stream_decoder.h:589
@ FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH
Definition stream_decoder.h:434
@ FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC
Definition stream_decoder.h:428
@ FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM
Definition stream_decoder.h:437
@ FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER
Definition stream_decoder.h:431
@ FLAC__STREAM_DECODER_READ_FRAME
Definition stream_decoder.h:214
@ FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR
Definition stream_decoder.h:232
@ FLAC__STREAM_DECODER_END_OF_STREAM
Definition stream_decoder.h:217
@ FLAC__STREAM_DECODER_OGG_ERROR
Definition stream_decoder.h:220
@ FLAC__STREAM_DECODER_READ_METADATA
Definition stream_decoder.h:206
@ FLAC__STREAM_DECODER_UNINITIALIZED
Definition stream_decoder.h:237
@ FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC
Definition stream_decoder.h:209
@ FLAC__STREAM_DECODER_SEARCH_FOR_METADATA
Definition stream_decoder.h:203
@ FLAC__STREAM_DECODER_ABORTED
Definition stream_decoder.h:229
@ FLAC__STREAM_DECODER_SEEK_ERROR
Definition stream_decoder.h:223
@ FLAC__STREAM_DECODER_WRITE_STATUS_ABORT
Definition stream_decoder.h:398
@ FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE
Definition stream_decoder.h:395
@ FLAC__STREAM_DECODER_TELL_STATUS_OK
Definition stream_decoder.h:349
@ FLAC__STREAM_DECODER_TELL_STATUS_ERROR
Definition stream_decoder.h:352
@ FLAC__STREAM_DECODER_TELL_STATUS_UNSUPPORTED
Definition stream_decoder.h:355
@ FLAC__STREAM_DECODER_INIT_STATUS_MEMORY_ALLOCATION_ERROR
Definition stream_decoder.h:268
@ FLAC__STREAM_DECODER_INIT_STATUS_INVALID_CALLBACKS
Definition stream_decoder.h:265
@ FLAC__STREAM_DECODER_INIT_STATUS_ERROR_OPENING_FILE
Definition stream_decoder.h:271
@ FLAC__STREAM_DECODER_INIT_STATUS_UNSUPPORTED_CONTAINER
Definition stream_decoder.h:260
@ FLAC__STREAM_DECODER_INIT_STATUS_ALREADY_INITIALIZED
Definition stream_decoder.h:275
@ FLAC__STREAM_DECODER_INIT_STATUS_OK
Definition stream_decoder.h:257
@ FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED
Definition stream_decoder.h:332
@ FLAC__STREAM_DECODER_SEEK_STATUS_ERROR
Definition stream_decoder.h:329
@ FLAC__STREAM_DECODER_SEEK_STATUS_OK
Definition stream_decoder.h:326
@ FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR
Definition stream_decoder.h:375
@ FLAC__STREAM_DECODER_LENGTH_STATUS_UNSUPPORTED
Definition stream_decoder.h:378
@ FLAC__STREAM_DECODER_LENGTH_STATUS_OK
Definition stream_decoder.h:372
@ FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM
Definition stream_decoder.h:298
@ FLAC__STREAM_DECODER_READ_STATUS_ABORT
Definition stream_decoder.h:309
@ FLAC__STREAM_DECODER_READ_STATUS_CONTINUE
Definition stream_decoder.h:295
int32_t FLAC__int32
Definition ordinals.h:62
FLAC__uint8 FLAC__byte
Definition ordinals.h:72
int FLAC__bool
Definition ordinals.h:70
uint64_t FLAC__uint64
Definition ordinals.h:66
Definition format.h:473
Definition stream_decoder.h:462
Definition stream_decoder.c:126
FLAC__StreamDecoderReadCallback read_callback
Definition stream_decoder.c:130
FLAC__Frame frame
Definition stream_decoder.c:159
FLAC__StreamDecoderEofCallback eof_callback
Definition stream_decoder.c:134
FLAC__StreamDecoderSeekCallback seek_callback
Definition stream_decoder.c:131
FLAC__StreamDecoderMetadataCallback metadata_callback
Definition stream_decoder.c:136
FLAC__StreamDecoderErrorCallback error_callback
Definition stream_decoder.c:137
void * client_data
Definition stream_decoder.c:144
FLAC__StreamDecoderWriteCallback write_callback
Definition stream_decoder.c:135
FLAC__StreamDecoderTellCallback tell_callback
Definition stream_decoder.c:132
FLAC__StreamDecoderLengthCallback length_callback
Definition stream_decoder.c:133
Definition stream_decoder.h:41
Definition format.h:834
signed int sample
Definition tap_dynamics_m.c:41
#define void
Definition unzip.h:396
struct zdirent * file
Definition win32.c:1500