openshot-audio  0.1.2
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 <stdio.h> /* for FILE */
37 #include "export.h"
38 #include "format.h"
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
44 
202 typedef enum {
203 
245 
251 extern FLAC_API const char * const FLAC__StreamDecoderStateString[];
252 
253 
256 typedef enum {
257 
283 
289 extern FLAC_API const char * const FLAC__StreamDecoderInitStatusString[];
290 
291 
294 typedef enum {
295 
314 
320 extern FLAC_API const char * const FLAC__StreamDecoderReadStatusString[];
321 
322 
325 typedef enum {
326 
337 
343 extern FLAC_API const char * const FLAC__StreamDecoderSeekStatusString[];
344 
345 
348 typedef enum {
349 
360 
366 extern FLAC_API const char * const FLAC__StreamDecoderTellStatusString[];
367 
368 
371 typedef enum {
372 
383 
389 extern FLAC_API const char * const FLAC__StreamDecoderLengthStatusString[];
390 
391 
394 typedef enum {
395 
403 
409 extern FLAC_API const char * const FLAC__StreamDecoderWriteStatusString[];
410 
411 
427 typedef enum {
428 
442 
448 extern FLAC_API const char * const FLAC__StreamDecoderErrorStatusString[];
449 
450 
451 /***********************************************************************
452  *
453  * class FLAC__StreamDecoder
454  *
455  ***********************************************************************/
456 
463 typedef struct {
464  struct FLAC__StreamDecoderProtected *protected_; /* avoid the C++ keyword 'protected' */
465  struct FLAC__StreamDecoderPrivate *private_; /* avoid the C++ keyword 'private' */
467 
518 
553 
591 
629 
656 
684 
711 
727 typedef void (*FLAC__StreamDecoderErrorCallback)(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data);
728 
729 
730 /***********************************************************************
731  *
732  * Class constructor/destructor
733  *
734  ***********************************************************************/
735 
744 
752 
753 
754 /***********************************************************************
755  *
756  * Public class method prototypes
757  *
758  ***********************************************************************/
759 
777 
799 
813 
828 
840 
854 
869 
881 
890 FLAC_API FLAC__StreamDecoderState FLAC__stream_decoder_get_state(const FLAC__StreamDecoder *decoder);
891 
901 
915 
927 
939 
951 
963 
975 
987 
1008 
1073 FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_stream(
1074  FLAC__StreamDecoder *decoder,
1083  void *client_data
1084 );
1085 
1154 FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_ogg_stream(
1155  FLAC__StreamDecoder *decoder,
1164  void *client_data
1165 );
1166 
1204 FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_FILE(
1205  FLAC__StreamDecoder *decoder,
1206  FILE *file,
1210  void *client_data
1211 );
1212 
1254 FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_ogg_FILE(
1255  FLAC__StreamDecoder *decoder,
1256  FILE *file,
1260  void *client_data
1261 );
1262 
1296 FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_file(
1297  FLAC__StreamDecoder *decoder,
1298  const char *filename,
1302  void *client_data
1303 );
1304 
1342 FLAC_API FLAC__StreamDecoderInitStatus FLAC__stream_decoder_init_ogg_file(
1343  FLAC__StreamDecoder *decoder,
1344  const char *filename,
1348  void *client_data
1349 );
1350 
1371 
1386 
1419 
1452 
1473 
1494 
1535 
1553 
1554 /* \} */
1555 
1556 #ifdef __cplusplus
1557 }
1558 #endif
1559 
1560 #endif
FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_respond(FLAC__StreamDecoder *decoder, FLAC__MetadataType type)
Definition: stream_decoder.c:735
Definition: stream_decoder.h:353
FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_respond_application(FLAC__StreamDecoder *decoder, const FLAC__byte id[4])
Definition: stream_decoder.c:752
Definition: stream_decoder.h:356
FLAC__StreamDecoderMetadataCallback metadata_callback
Definition: stream_decoder.c:136
FLAC_API const char *const FLAC__StreamDecoderTellStatusString[]
Definition: stream_decoder.c:221
FLAC_API const char *const FLAC__StreamDecoderSeekStatusString[]
Definition: stream_decoder.c:215
Definition: stream_decoder.h:215
FLAC_API FLAC__bool FLAC__stream_decoder_skip_single_frame(FLAC__StreamDecoder *decoder)
Definition: stream_decoder.c:1115
FLAC_API const char *const FLAC__StreamDecoderInitStatusString[]
Definition: stream_decoder.c:200
struct FLAC__StreamDecoderProtected * protected_
Definition: stream_decoder.h:464
Definition: stream_decoder.h:299
void * client_data
Definition: stream_decoder.c:144
FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_ignore_application(FLAC__StreamDecoder *decoder, const FLAC__byte id[4])
Definition: stream_decoder.c:811
Definition: stream_decoder.h:210
struct FLAC__StreamDecoderPrivate * private_
Definition: stream_decoder.h:465
Definition: stream_decoder.h:204
FLAC_API unsigned FLAC__stream_decoder_get_blocksize(const FLAC__StreamDecoder *decoder)
Definition: stream_decoder.c:905
FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_respond_all(FLAC__StreamDecoder *decoder)
Definition: stream_decoder.c:780
FLAC__StreamDecoderWriteStatus(* FLAC__StreamDecoderWriteCallback)(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 *const buffer[], void *client_data)
Definition: stream_decoder.h:683
FLAC__StreamDecoderLengthStatus(* FLAC__StreamDecoderLengthCallback)(const FLAC__StreamDecoder *decoder, FLAC__uint64 *stream_length, void *client_data)
Definition: stream_decoder.h:628
int FLAC__bool
Definition: ordinals.h:70
Definition: stream_decoder.h:333
Definition: stream_decoder.h:429
void(* FLAC__StreamDecoderErrorCallback)(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)
Definition: stream_decoder.h:727
Definition: libFLAC/include/protected/stream_decoder.h:41
Definition: stream_decoder.c:126
FLAC__StreamDecoderTellStatus
Definition: stream_decoder.h:348
Definition: stream_decoder.h:399
FLAC_API unsigned FLAC__stream_decoder_get_sample_rate(const FLAC__StreamDecoder *decoder)
Definition: stream_decoder.c:898
FLAC_API unsigned FLAC__stream_decoder_get_channels(const FLAC__StreamDecoder *decoder)
Definition: stream_decoder.c:877
Definition: stream_decoder.h:230
Definition: stream_decoder.h:218
FLAC__StreamDecoderErrorStatus
Definition: stream_decoder.h:427
Definition: stream_decoder.h:463
FLAC__bool(* FLAC__StreamDecoderEofCallback)(const FLAC__StreamDecoder *decoder, void *client_data)
Definition: stream_decoder.h:655
FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_ignore(FLAC__StreamDecoder *decoder, FLAC__MetadataType type)
Definition: stream_decoder.c:794
Definition: stream_decoder.h:296
FLAC_API const char *const FLAC__StreamDecoderLengthStatusString[]
Definition: stream_decoder.c:227
FLAC_API const char *const FLAC__StreamDecoderStateString[]
Definition: stream_decoder.c:187
FLAC_API FLAC__bool FLAC__stream_decoder_process_until_end_of_stream(FLAC__StreamDecoder *decoder)
Definition: stream_decoder.c:1081
Definition: stream_decoder.h:396
JOCTET * buffer
Definition: juce_JPEGLoader.cpp:302
Definition: stream_decoder.h:258
FLAC_API FLAC__uint64 FLAC__stream_decoder_get_total_samples(const FLAC__StreamDecoder *decoder)
Definition: stream_decoder.c:870
FLAC__StreamDecoderEofCallback eof_callback
Definition: stream_decoder.c:134
FLAC_API FLAC__bool FLAC__stream_decoder_flush(FLAC__StreamDecoder *decoder)
Definition: stream_decoder.c:934
FLAC__StreamDecoderInitStatus
Definition: stream_decoder.h:256
FLAC__StreamDecoderWriteStatus
Definition: stream_decoder.h:394
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)
FLAC_API void FLAC__stream_decoder_delete(FLAC__StreamDecoder *decoder)
Definition: stream_decoder.c:313
Definition: stream_decoder.h:207
Definition: format.h:473
FLAC_API FLAC__bool FLAC__stream_decoder_set_md5_checking(FLAC__StreamDecoder *decoder, FLAC__bool value)
Definition: stream_decoder.c:725
FLAC__StreamDecoderTellCallback tell_callback
Definition: stream_decoder.c:132
Definition: stream_decoder.h:330
FLAC_API const char * FLAC__stream_decoder_get_resolved_state_string(const FLAC__StreamDecoder *decoder)
Definition: stream_decoder.c:858
FLAC_API FLAC__bool FLAC__stream_decoder_process_until_end_of_metadata(FLAC__StreamDecoder *decoder)
Definition: stream_decoder.c:1054
void(* FLAC__StreamDecoderMetadataCallback)(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data)
Definition: stream_decoder.h:710
FLAC_API FLAC__bool FLAC__stream_decoder_get_md5_checking(const FLAC__StreamDecoder *decoder)
Definition: stream_decoder.c:863
FLAC__uint8 FLAC__byte
Definition: ordinals.h:72
Definition: format.h:834
Definition: stream_decoder.h:379
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_API FLAC__StreamDecoder * FLAC__stream_decoder_new(void)
Definition: stream_decoder.c:250
Definition: stream_decoder.h:224
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)
#define FLAC_API
Definition: export.h:73
FLAC__StreamDecoderSeekStatus(* FLAC__StreamDecoderSeekCallback)(const FLAC__StreamDecoder *decoder, FLAC__uint64 absolute_byte_offset, void *client_data)
Definition: stream_decoder.h:552
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
Definition: juce_win32_Windowing.cpp:76
FLAC__MetadataType
Definition: format.h:489
Definition: stream_decoder.h:233
FLAC__StreamDecoderReadStatus
Definition: stream_decoder.h:294
Definition: stream_decoder.h:432
FLAC_API FLAC__bool FLAC__stream_decoder_process_single(FLAC__StreamDecoder *decoder)
Definition: stream_decoder.c:1017
FLAC__StreamDecoderSeekCallback seek_callback
Definition: stream_decoder.c:131
FLAC_API FLAC__ChannelAssignment FLAC__stream_decoder_get_channel_assignment(const FLAC__StreamDecoder *decoder)
Definition: stream_decoder.c:884
FLAC__StreamDecoderState
Definition: stream_decoder.h:202
FLAC_API FLAC__bool FLAC__stream_decoder_get_decode_position(const FLAC__StreamDecoder *decoder, FLAC__uint64 *position)
Definition: stream_decoder.c:912
void
Definition: juce_PNGLoader.cpp:1173
Definition: stream_decoder.h:373
FLAC__StreamDecoderLengthStatus
Definition: stream_decoder.h:371
FLAC_API FLAC__bool FLAC__stream_decoder_set_ogg_serial_number(FLAC__StreamDecoder *decoder, long serial_number)
Definition: stream_decoder.c:708
FLAC__ChannelAssignment
Definition: format.h:381
FLAC__Frame frame
Definition: stream_decoder.c:159
FILE * file
Definition: stream_decoder.c:145
FLAC__StreamDecoderLengthCallback length_callback
Definition: stream_decoder.c:133
Definition: stream_decoder.h:327
Definition: stream_decoder.h:238
FLAC_API FLAC__bool FLAC__stream_decoder_finish(FLAC__StreamDecoder *decoder)
Definition: stream_decoder.c:642
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 FLAC__bool FLAC__stream_decoder_set_metadata_ignore_all(FLAC__StreamDecoder *decoder)
Definition: stream_decoder.c:839
FLAC__StreamDecoderErrorCallback error_callback
Definition: stream_decoder.c:137
FLAC__StreamDecoderReadStatus(* FLAC__StreamDecoderReadCallback)(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data)
Definition: stream_decoder.h:517
FLAC__StreamDecoderTellStatus(* FLAC__StreamDecoderTellCallback)(const FLAC__StreamDecoder *decoder, FLAC__uint64 *absolute_byte_offset, void *client_data)
Definition: stream_decoder.h:590
FLAC__StreamDecoderReadCallback read_callback
Definition: stream_decoder.c:130
FLAC_API FLAC__bool FLAC__stream_decoder_reset(FLAC__StreamDecoder *decoder)
Definition: stream_decoder.c:957
FLAC_API const char *const FLAC__StreamDecoderErrorStatusString[]
Definition: stream_decoder.c:238
uint64_t FLAC__uint64
Definition: ordinals.h:66
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)
FLAC_API const char *const FLAC__StreamDecoderWriteStatusString[]
Definition: stream_decoder.c:233
Definition: stream_decoder.h:376
Definition: stream_decoder.h:221
Definition: stream_decoder.h:310
FLAC__StreamDecoderSeekStatus
Definition: stream_decoder.h:325
FLAC_API unsigned FLAC__stream_decoder_get_bits_per_sample(const FLAC__StreamDecoder *decoder)
Definition: stream_decoder.c:891
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__StreamDecoderWriteCallback write_callback
Definition: stream_decoder.c:135
Definition: stream_decoder.h:350
FLAC_API const char *const FLAC__StreamDecoderReadStatusString[]
Definition: stream_decoder.c:209
int32_t FLAC__int32
Definition: ordinals.h:62