1 /* test_libFLAC - Unit tester for libFLAC
2  * Copyright (C) 2002-2009  Josh Coalson
3  * Copyright (C) 2011-2016  Xiph.Org Foundation
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #ifndef FLAC__TEST_LIBS_COMMON_METADATA_UTILS_H
21 #define FLAC__TEST_LIBS_COMMON_METADATA_UTILS_H
22 
23 /*
24  * These are not tests, just utility functions used by the metadata tests
25  */
26 
27 #include "FLAC/format.h"
28 
29 FLAC__bool mutils__compare_block_data_streaminfo(const FLAC__StreamMetadata_StreamInfo *block, const FLAC__StreamMetadata_StreamInfo *blockcopy);
30 
31 FLAC__bool mutils__compare_block_data_padding(const FLAC__StreamMetadata_Padding *block, const FLAC__StreamMetadata_Padding *blockcopy, uint32_t block_length);
32 
33 FLAC__bool mutils__compare_block_data_application(const FLAC__StreamMetadata_Application *block, const FLAC__StreamMetadata_Application *blockcopy, uint32_t block_length);
34 
35 FLAC__bool mutils__compare_block_data_seektable(const FLAC__StreamMetadata_SeekTable *block, const FLAC__StreamMetadata_SeekTable *blockcopy);
36 
37 FLAC__bool mutils__compare_block_data_vorbiscomment(const FLAC__StreamMetadata_VorbisComment *block, const FLAC__StreamMetadata_VorbisComment *blockcopy);
38 
39 FLAC__bool mutils__compare_block_data_cuesheet(const FLAC__StreamMetadata_CueSheet *block, const FLAC__StreamMetadata_CueSheet *blockcopy);
40 
41 FLAC__bool mutils__compare_block_data_picture(const FLAC__StreamMetadata_Picture *block, const FLAC__StreamMetadata_Picture *blockcopy);
42 
43 FLAC__bool mutils__compare_block_data_unknown(const FLAC__StreamMetadata_Unknown *block, const FLAC__StreamMetadata_Unknown *blockcopy, uint32_t block_length);
44 
45 FLAC__bool mutils__compare_block(const FLAC__StreamMetadata *block, const FLAC__StreamMetadata *blockcopy);
46 
47 void mutils__init_metadata_blocks(
48 	FLAC__StreamMetadata *streaminfo,
49 	FLAC__StreamMetadata *padding,
50 	FLAC__StreamMetadata *seektable,
51 	FLAC__StreamMetadata *application1,
52 	FLAC__StreamMetadata *application2,
53 	FLAC__StreamMetadata *vorbiscomment,
54 	FLAC__StreamMetadata *cuesheet,
55 	FLAC__StreamMetadata *picture,
56 	FLAC__StreamMetadata *unknown
57 );
58 
59 void mutils__free_metadata_blocks(
60 	FLAC__StreamMetadata *streaminfo,
61 	FLAC__StreamMetadata *padding,
62 	FLAC__StreamMetadata *seektable,
63 	FLAC__StreamMetadata *application1,
64 	FLAC__StreamMetadata *application2,
65 	FLAC__StreamMetadata *vorbiscomment,
66 	FLAC__StreamMetadata *cuesheet,
67 	FLAC__StreamMetadata *picture,
68 	FLAC__StreamMetadata *unknown
69 );
70 
71 #endif
72