Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

# format.h

Go to the documentation of this file.

    00001 /* libFLAC - Free Lossless Audio Codec library
    00002  * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007  Josh Coalson
    00003  *
    00004  * Redistribution and use in source and binary forms, with or without
    00005  * modification, are permitted provided that the following conditions
    00006  * are met:
    00007  *
    00008  * - Redistributions of source code must retain the above copyright
    00009  * notice, this list of conditions and the following disclaimer.
    00010  *
    00011  * - Redistributions in binary form must reproduce the above copyright
    00012  * notice, this list of conditions and the following disclaimer in the
    00013  * documentation and/or other materials provided with the distribution.
    00014  *
    00015  * - Neither the name of the Xiph.org Foundation nor the names of its
    00016  * contributors may be used to endorse or promote products derived from
    00017  * this software without specific prior written permission.
    00018  *
    00019  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    00020  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    00021  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    00022  * A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
    00023  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    00024  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    00025  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    00026  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
    00027  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    00028  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    00029  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    00030  */
    00031
    00032 #ifndef FLAC__FORMAT_H
    00033 #define FLAC__FORMAT_H
    00034
    00035 #include "export.h"
    00036 #include "ordinals.h"
    00037
    00038 #ifdef __cplusplus
    00039 extern "C" {
    00040 #endif
    00041
    00086 /*
    00087     Most of the values described in this file are defined by the FLAC
    00088     format specification.  There is nothing to tune here.
    00089 */
    00090
    00092 #define FLAC__MAX_METADATA_TYPE_CODE (126u)
    00093
    00095 #define FLAC__MIN_BLOCK_SIZE (16u)
    00096
    00098 #define FLAC__MAX_BLOCK_SIZE (65535u)
    00099
    00102 #define FLAC__SUBSET_MAX_BLOCK_SIZE_48000HZ (4608u)
    00103
    00105 #define FLAC__MAX_CHANNELS (8u)
    00106
    00108 #define FLAC__MIN_BITS_PER_SAMPLE (4u)
    00109
    00111 #define FLAC__MAX_BITS_PER_SAMPLE (32u)
    00112
    00121 #define FLAC__REFERENCE_CODEC_MAX_BITS_PER_SAMPLE (24u)
    00122
    00127 #define FLAC__MAX_SAMPLE_RATE (655350u)
    00128
    00130 #define FLAC__MAX_LPC_ORDER (32u)
    00131
    00134 #define FLAC__SUBSET_MAX_LPC_ORDER_48000HZ (12u)
    00135
    00139 #define FLAC__MIN_QLP_COEFF_PRECISION (5u)
    00140
    00144 #define FLAC__MAX_QLP_COEFF_PRECISION (15u)
    00145
    00147 #define FLAC__MAX_FIXED_ORDER (4u)
    00148
    00150 #define FLAC__MAX_RICE_PARTITION_ORDER (15u)
    00151
    00153 #define FLAC__SUBSET_MAX_RICE_PARTITION_ORDER (8u)
    00154
    00161 extern FLAC_API const char *FLAC__VERSION_STRING;
    00162
    00167 extern FLAC_API const char *FLAC__VENDOR_STRING;
    00168
    00170 extern FLAC_API const FLAC__byte FLAC__STREAM_SYNC_STRING[4]; /* = "fLaC" */
    00171
    00175 extern FLAC_API const unsigned FLAC__STREAM_SYNC; /* = 0x664C6143 */
    00176
    00178 extern FLAC_API const unsigned FLAC__STREAM_SYNC_LEN; /* = 32 bits */
    00179
    00181 #define FLAC__STREAM_SYNC_LENGTH (4u)
    00182
    00183
    00184 /*****************************************************************************
    00185  *
    00186  * Subframe structures
    00187  *
    00188  *****************************************************************************/
    00189
    00190 /*****************************************************************************/
    00191
    00193 typedef enum {
    00194     FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE = 0
    00197 } FLAC__EntropyCodingMethodType;
    00198
    00204 extern FLAC_API const char * const FLAC__EntropyCodingMethodTypeString[];
    00205
    00206
    00209 typedef struct {
    00210
    00211     unsigned *parameters;
    00214     unsigned *raw_bits;
    00217     unsigned capacity_by_order;
    00222 } FLAC__EntropyCodingMethod_PartitionedRiceContents;
    00223
    00226 typedef struct {
    00227
    00228     unsigned order;
    00231     const FLAC__EntropyCodingMethod_PartitionedRiceContents *contents;
    00234 } FLAC__EntropyCodingMethod_PartitionedRice;
    00235
    00236 extern FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_ORDER_LEN;
    00237 extern FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_PARAMETER_LEN;
    00238 extern FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_RAW_LEN;
    00240 extern FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_ESCAPE_PARAMETER;
    00245 typedef struct {
    00246     FLAC__EntropyCodingMethodType type;
    00247     union {
    00248         FLAC__EntropyCodingMethod_PartitionedRice partitioned_rice;
    00249     } data;
    00250 } FLAC__EntropyCodingMethod;
    00251
    00252 extern FLAC_API const unsigned FLAC__ENTROPY_CODING_METHOD_TYPE_LEN;
    00254 /*****************************************************************************/
    00255
    00257 typedef enum {
    00258     FLAC__SUBFRAME_TYPE_CONSTANT = 0,
    00259     FLAC__SUBFRAME_TYPE_VERBATIM = 1,
    00260     FLAC__SUBFRAME_TYPE_FIXED = 2,
    00261     FLAC__SUBFRAME_TYPE_LPC = 3
    00262 } FLAC__SubframeType;
    00263
    00269 extern FLAC_API const char * const FLAC__SubframeTypeString[];
    00270
    00271
    00274 typedef struct {
    00275     FLAC__int32 value;
    00276 } FLAC__Subframe_Constant;
    00277
    00278
    00281 typedef struct {
    00282     const FLAC__int32 *data;
    00283 } FLAC__Subframe_Verbatim;
    00284
    00285
    00288 typedef struct {
    00289     FLAC__EntropyCodingMethod entropy_coding_method;
    00292     unsigned order;
    00295     FLAC__int32 warmup[FLAC__MAX_FIXED_ORDER];
    00298     const FLAC__int32 *residual;
    00300 } FLAC__Subframe_Fixed;
    00301
    00302
    00305 typedef struct {
    00306     FLAC__EntropyCodingMethod entropy_coding_method;
    00309     unsigned order;
    00312     unsigned qlp_coeff_precision;
    00315     int quantization_level;
    00318     FLAC__int32 qlp_coeff[FLAC__MAX_LPC_ORDER];
    00321     FLAC__int32 warmup[FLAC__MAX_LPC_ORDER];
    00324     const FLAC__int32 *residual;
    00326 } FLAC__Subframe_LPC;
    00327
    00328 extern FLAC_API const unsigned FLAC__SUBFRAME_LPC_QLP_COEFF_PRECISION_LEN;
    00329 extern FLAC_API const unsigned FLAC__SUBFRAME_LPC_QLP_SHIFT_LEN;
    00334 typedef struct {
    00335     FLAC__SubframeType type;
    00336     union {
    00337         FLAC__Subframe_Constant constant;
    00338         FLAC__Subframe_Fixed fixed;
    00339         FLAC__Subframe_LPC lpc;
    00340         FLAC__Subframe_Verbatim verbatim;
    00341     } data;
    00342     unsigned wasted_bits;
    00343 } FLAC__Subframe;
    00344
    00345 extern FLAC_API const unsigned FLAC__SUBFRAME_ZERO_PAD_LEN;
    00346 extern FLAC_API const unsigned FLAC__SUBFRAME_TYPE_LEN;
    00347 extern FLAC_API const unsigned FLAC__SUBFRAME_WASTED_BITS_FLAG_LEN;
    00349 extern FLAC_API const unsigned FLAC__SUBFRAME_TYPE_CONSTANT_BYTE_ALIGNED_MASK;
    00350 extern FLAC_API const unsigned FLAC__SUBFRAME_TYPE_VERBATIM_BYTE_ALIGNED_MASK;
    00351 extern FLAC_API const unsigned FLAC__SUBFRAME_TYPE_FIXED_BYTE_ALIGNED_MASK;
    00352 extern FLAC_API const unsigned FLAC__SUBFRAME_TYPE_LPC_BYTE_ALIGNED_MASK;
    00354 /*****************************************************************************/
    00355
    00356
    00357 /*****************************************************************************
    00358  *
    00359  * Frame structures
    00360  *
    00361  *****************************************************************************/
    00362
    00364 typedef enum {
    00365     FLAC__CHANNEL_ASSIGNMENT_INDEPENDENT = 0,
    00366     FLAC__CHANNEL_ASSIGNMENT_LEFT_SIDE = 1,
    00367     FLAC__CHANNEL_ASSIGNMENT_RIGHT_SIDE = 2,
    00368     FLAC__CHANNEL_ASSIGNMENT_MID_SIDE = 3
    00369 } FLAC__ChannelAssignment;
    00370
    00376 extern FLAC_API const char * const FLAC__ChannelAssignmentString[];
    00377
    00379 typedef enum {
    00380     FLAC__FRAME_NUMBER_TYPE_FRAME_NUMBER,
    00381     FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER
    00382 } FLAC__FrameNumberType;
    00383
    00389 extern FLAC_API const char * const FLAC__FrameNumberTypeString[];
    00390
    00391
    00394 typedef struct {
    00395     unsigned blocksize;
    00398     unsigned sample_rate;
    00401     unsigned channels;
    00404     FLAC__ChannelAssignment channel_assignment;
    00407     unsigned bits_per_sample;
    00410     FLAC__FrameNumberType number_type;
    00413     union {
    00414         FLAC__uint32 frame_number;
    00415         FLAC__uint64 sample_number;
    00416     } number;
    00420     FLAC__uint8 crc;
    00425 } FLAC__FrameHeader;
    00426
    00427 extern FLAC_API const unsigned FLAC__FRAME_HEADER_SYNC;
    00428 extern FLAC_API const unsigned FLAC__FRAME_HEADER_SYNC_LEN;
    00429 extern FLAC_API const unsigned FLAC__FRAME_HEADER_RESERVED_LEN;
    00430 extern FLAC_API const unsigned FLAC__FRAME_HEADER_BLOCK_SIZE_LEN;
    00431 extern FLAC_API const unsigned FLAC__FRAME_HEADER_SAMPLE_RATE_LEN;
    00432 extern FLAC_API const unsigned FLAC__FRAME_HEADER_CHANNEL_ASSIGNMENT_LEN;
    00433 extern FLAC_API const unsigned FLAC__FRAME_HEADER_BITS_PER_SAMPLE_LEN;
    00434 extern FLAC_API const unsigned FLAC__FRAME_HEADER_ZERO_PAD_LEN;
    00435 extern FLAC_API const unsigned FLAC__FRAME_HEADER_CRC_LEN;
    00440 typedef struct {
    00441     FLAC__uint16 crc;
    00446 } FLAC__FrameFooter;
    00447
    00448 extern FLAC_API const unsigned FLAC__FRAME_FOOTER_CRC_LEN;
    00453 typedef struct {
    00454     FLAC__FrameHeader header;
    00455     FLAC__Subframe subframes[FLAC__MAX_CHANNELS];
    00456     FLAC__FrameFooter footer;
    00457 } FLAC__Frame;
    00458
    00459 /*****************************************************************************/
    00460
    00461
    00462 /*****************************************************************************
    00463  *
    00464  * Meta-data structures
    00465  *
    00466  *****************************************************************************/
    00467
    00469 typedef enum {
    00470
    00471     FLAC__METADATA_TYPE_STREAMINFO = 0,
    00474     FLAC__METADATA_TYPE_PADDING = 1,
    00477     FLAC__METADATA_TYPE_APPLICATION = 2,
    00480     FLAC__METADATA_TYPE_SEEKTABLE = 3,
    00483     FLAC__METADATA_TYPE_VORBIS_COMMENT = 4,
    00486     FLAC__METADATA_TYPE_CUESHEET = 5,
    00489     FLAC__METADATA_TYPE_PICTURE = 6,
    00492     FLAC__METADATA_TYPE_UNDEFINED = 7
    00495 } FLAC__MetadataType;
    00496
    00502 extern FLAC_API const char * const FLAC__MetadataTypeString[];
    00503
    00504
    00507 typedef struct {
    00508     unsigned min_blocksize, max_blocksize;
    00509     unsigned min_framesize, max_framesize;
    00510     unsigned sample_rate;
    00511     unsigned channels;
    00512     unsigned bits_per_sample;
    00513     FLAC__uint64 total_samples;
    00514     FLAC__byte md5sum[16];
    00515 } FLAC__StreamMetadata_StreamInfo;
    00516
    00517 extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MIN_BLOCK_SIZE_LEN;
    00518 extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MAX_BLOCK_SIZE_LEN;
    00519 extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MIN_FRAME_SIZE_LEN;
    00520 extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MAX_FRAME_SIZE_LEN;
    00521 extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_SAMPLE_RATE_LEN;
    00522 extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LEN;
    00523 extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_BITS_PER_SAMPLE_LEN;
    00524 extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LEN;
    00525 extern FLAC_API const unsigned FLAC__STREAM_METADATA_STREAMINFO_MD5SUM_LEN;
    00528 #define FLAC__STREAM_METADATA_STREAMINFO_LENGTH (34u)
    00529
    00532 typedef struct {
    00533     int dummy;
    00538 } FLAC__StreamMetadata_Padding;
    00539
    00540
    00543 typedef struct {
    00544     FLAC__byte id[4];
    00545     FLAC__byte *data;
    00546 } FLAC__StreamMetadata_Application;
    00547
    00548 extern FLAC_API const unsigned FLAC__STREAM_METADATA_APPLICATION_ID_LEN;
    00552 typedef struct {
    00553     FLAC__uint64 sample_number;
    00556     FLAC__uint64 stream_offset;
    00560     unsigned frame_samples;
    00562 } FLAC__StreamMetadata_SeekPoint;
    00563
    00564 extern FLAC_API const unsigned FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN;
    00565 extern FLAC_API const unsigned FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN;
    00566 extern FLAC_API const unsigned FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LEN;
    00569 #define FLAC__STREAM_METADATA_SEEKPOINT_LENGTH (18u)
    00570
    00575 extern FLAC_API const FLAC__uint64 FLAC__STREAM_METADATA_SEEKPOINT_PLACEHOLDER;
    00576
    00577
    00590 typedef struct {
    00591     unsigned num_points;
    00592     FLAC__StreamMetadata_SeekPoint *points;
    00593 } FLAC__StreamMetadata_SeekTable;
    00594
    00595
    00602 typedef struct {
    00603     FLAC__uint32 length;
    00604     FLAC__byte *entry;
    00605 } FLAC__StreamMetadata_VorbisComment_Entry;
    00606
    00607 extern FLAC_API const unsigned FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LEN;
    00612 typedef struct {
    00613     FLAC__StreamMetadata_VorbisComment_Entry vendor_string;
    00614     FLAC__uint32 num_comments;
    00615     FLAC__StreamMetadata_VorbisComment_Entry *comments;
    00616 } FLAC__StreamMetadata_VorbisComment;
    00617
    00618 extern FLAC_API const unsigned FLAC__STREAM_METADATA_VORBIS_COMMENT_NUM_COMMENTS_LEN;
    00625 typedef struct {
    00626     FLAC__uint64 offset;
    00631     FLAC__byte number;
    00633 } FLAC__StreamMetadata_CueSheet_Index;
    00634
    00635 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_INDEX_OFFSET_LEN;
    00636 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_INDEX_NUMBER_LEN;
    00637 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_INDEX_RESERVED_LEN;
    00644 typedef struct {
    00645     FLAC__uint64 offset;
    00648     FLAC__byte number;
    00651     char isrc[13];
    00654     unsigned type:1;
    00657     unsigned pre_emphasis:1;
    00660     FLAC__byte num_indices;
    00663     FLAC__StreamMetadata_CueSheet_Index *indices;
    00666 } FLAC__StreamMetadata_CueSheet_Track;
    00667
    00668 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_TRACK_OFFSET_LEN;
    00669 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_TRACK_NUMBER_LEN;
    00670 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_TRACK_ISRC_LEN;
    00671 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_TRACK_TYPE_LEN;
    00672 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_TRACK_PRE_EMPHASIS_LEN;
    00673 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_TRACK_RESERVED_LEN;
    00674 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_TRACK_NUM_INDICES_LEN;
    00681 typedef struct {
    00682     char media_catalog_number[129];
    00688     FLAC__uint64 lead_in;
    00691     FLAC__bool is_cd;
    00694     unsigned num_tracks;
    00697     FLAC__StreamMetadata_CueSheet_Track *tracks;
    00700 } FLAC__StreamMetadata_CueSheet;
    00701
    00702 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_MEDIA_CATALOG_NUMBER_LEN;
    00703 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_LEAD_IN_LEN;
    00704 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_IS_CD_LEN;
    00705 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_RESERVED_LEN;
    00706 extern FLAC_API const unsigned FLAC__STREAM_METADATA_CUESHEET_NUM_TRACKS_LEN;
    00710 typedef enum {
    00711     FLAC__STREAM_METADATA_PICTURE_TYPE_OTHER = 0,
    00712     FLAC__STREAM_METADATA_PICTURE_TYPE_FILE_ICON_STANDARD = 1,
    00713     FLAC__STREAM_METADATA_PICTURE_TYPE_FILE_ICON = 2,
    00714     FLAC__STREAM_METADATA_PICTURE_TYPE_FRONT_COVER = 3,
    00715     FLAC__STREAM_METADATA_PICTURE_TYPE_BACK_COVER = 4,
    00716     FLAC__STREAM_METADATA_PICTURE_TYPE_LEAFLET_PAGE = 5,
    00717     FLAC__STREAM_METADATA_PICTURE_TYPE_MEDIA = 6,
    00718     FLAC__STREAM_METADATA_PICTURE_TYPE_LEAD_ARTIST = 7,
    00719     FLAC__STREAM_METADATA_PICTURE_TYPE_ARTIST = 8,
    00720     FLAC__STREAM_METADATA_PICTURE_TYPE_CONDUCTOR = 9,
    00721     FLAC__STREAM_METADATA_PICTURE_TYPE_BAND = 10,
    00722     FLAC__STREAM_METADATA_PICTURE_TYPE_COMPOSER = 11,
    00723     FLAC__STREAM_METADATA_PICTURE_TYPE_LYRICIST = 12,
    00724     FLAC__STREAM_METADATA_PICTURE_TYPE_RECORDING_LOCATION = 13,
    00725     FLAC__STREAM_METADATA_PICTURE_TYPE_DURING_RECORDING = 14,
    00726     FLAC__STREAM_METADATA_PICTURE_TYPE_DURING_PERFORMANCE = 15,
    00727     FLAC__STREAM_METADATA_PICTURE_TYPE_VIDEO_SCREEN_CAPTURE = 16,
    00728     FLAC__STREAM_METADATA_PICTURE_TYPE_FISH = 17,
    00729     FLAC__STREAM_METADATA_PICTURE_TYPE_ILLUSTRATION = 18,
    00730     FLAC__STREAM_METADATA_PICTURE_TYPE_BAND_LOGOTYPE = 19,
    00731     FLAC__STREAM_METADATA_PICTURE_TYPE_PUBLISHER_LOGOTYPE = 20,
    00732     FLAC__STREAM_METADATA_PICTURE_TYPE_UNDEFINED
    00733 } FLAC__StreamMetadata_Picture_Type;
    00734
    00741 extern FLAC_API const char * const FLAC__StreamMetadata_Picture_TypeString[];
    00742
    00747 typedef struct {
    00748     FLAC__StreamMetadata_Picture_Type type;
    00751     char *mime_type;
    00762     FLAC__byte *description;
    00769     FLAC__uint32 width;
    00772     FLAC__uint32 height;
    00775     FLAC__uint32 depth;
    00778     FLAC__uint32 colors;
    00783     FLAC__uint32 data_length;
    00786     FLAC__byte *data;
    00789 } FLAC__StreamMetadata_Picture;
    00790
    00791 extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_TYPE_LEN;
    00792 extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_MIME_TYPE_LENGTH_LEN;
    00793 extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_DESCRIPTION_LENGTH_LEN;
    00794 extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_WIDTH_LEN;
    00795 extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_HEIGHT_LEN;
    00796 extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_DEPTH_LEN;
    00797 extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_COLORS_LEN;
    00798 extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_DATA_LENGTH_LEN;
    00805 typedef struct {
    00806     FLAC__byte *data;
    00807 } FLAC__StreamMetadata_Unknown;
    00808
    00809
    00812 typedef struct {
    00813     FLAC__MetadataType type;
    00818     FLAC__bool is_last;
    00821     unsigned length;
    00824     union {
    00825         FLAC__StreamMetadata_StreamInfo stream_info;
    00826         FLAC__StreamMetadata_Padding padding;
    00827         FLAC__StreamMetadata_Application application;
    00828         FLAC__StreamMetadata_SeekTable seek_table;
    00829         FLAC__StreamMetadata_VorbisComment vorbis_comment;
    00830         FLAC__StreamMetadata_CueSheet cue_sheet;
    00831         FLAC__StreamMetadata_Picture picture;
    00832         FLAC__StreamMetadata_Unknown unknown;
    00833     } data;
    00836 } FLAC__StreamMetadata;
    00837
    00838 extern FLAC_API const unsigned FLAC__STREAM_METADATA_IS_LAST_LEN;
    00839 extern FLAC_API const unsigned FLAC__STREAM_METADATA_TYPE_LEN;
    00840 extern FLAC_API const unsigned FLAC__STREAM_METADATA_LENGTH_LEN;
    00843 #define FLAC__STREAM_METADATA_HEADER_LENGTH (4u)
    00844
    00845 /*****************************************************************************/
    00846
    00847
    00848 /*****************************************************************************
    00849  *
    00850  * Utility functions
    00851  *
    00852  *****************************************************************************/
    00853
    00862 FLAC_API FLAC__bool FLAC__format_sample_rate_is_valid(unsigned sample_rate);
    00863
    00876 FLAC_API FLAC__bool FLAC__format_vorbiscomment_entry_name_is_legal(const char *name);
    00877
    00892 FLAC_API FLAC__bool FLAC__format_vorbiscomment_entry_value_is_legal(const FLAC__byte *value, unsigned length);
    00893
    00909 FLAC_API FLAC__bool FLAC__format_vorbiscomment_entry_is_legal(const FLAC__byte *entry, unsigned length);
    00910
    00911 /* @@@@ add to unit tests; it is already indirectly tested by the metadata_object tests */
    00922 FLAC_API FLAC__bool FLAC__format_seektable_is_legal(const FLAC__StreamMetadata_SeekTable *seek_table);
    00923
    00924 /* @@@@ add to unit tests; it is already indirectly tested by the metadata_object tests */
    00937 FLAC_API unsigned FLAC__format_seektable_sort(FLAC__StreamMetadata_SeekTable *seek_table);
    00938
    00939 /* @@@@ add to unit tests; it is already indirectly tested by the metadata_object tests */
    00958 FLAC_API FLAC__bool FLAC__format_cuesheet_is_legal(const FLAC__StreamMetadata_CueSheet *cue_sheet, FLAC__bool check_cd_da_subset, const char **violation);
    00959
    00960 /* @@@@ add to unit tests; it is already indirectly tested by the metadata_object tests */
    00977 FLAC_API FLAC__bool FLAC__format_picture_is_legal(const FLAC__StreamMetadata_Picture *picture, const char **violation);
    00978
    00979 /* \} */
    00980
    00981 #ifdef __cplusplus
    00982 }
    00983 #endif
    00984
    00985 #endif

Copyright (c) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson |