metadata_utils.h 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. #ifndef FLAC__TEST_LIBS_COMMON_METADATA_UTILS_H
  20. #define FLAC__TEST_LIBS_COMMON_METADATA_UTILS_H
  21. /*
  22. * These are not tests, just utility functions used by the metadata tests
  23. */
  24. #include "FLAC/format.h"
  25. FLAC__bool mutils__compare_block_data_streaminfo(const FLAC__StreamMetadata_StreamInfo *block, const FLAC__StreamMetadata_StreamInfo *blockcopy);
  26. FLAC__bool mutils__compare_block_data_padding(const FLAC__StreamMetadata_Padding *block, const FLAC__StreamMetadata_Padding *blockcopy, unsigned block_length);
  27. FLAC__bool mutils__compare_block_data_application(const FLAC__StreamMetadata_Application *block, const FLAC__StreamMetadata_Application *blockcopy, unsigned block_length);
  28. FLAC__bool mutils__compare_block_data_seektable(const FLAC__StreamMetadata_SeekTable *block, const FLAC__StreamMetadata_SeekTable *blockcopy);
  29. FLAC__bool mutils__compare_block_data_vorbiscomment(const FLAC__StreamMetadata_VorbisComment *block, const FLAC__StreamMetadata_VorbisComment *blockcopy);
  30. FLAC__bool mutils__compare_block_data_cuesheet(const FLAC__StreamMetadata_CueSheet *block, const FLAC__StreamMetadata_CueSheet *blockcopy);
  31. FLAC__bool mutils__compare_block_data_picture(const FLAC__StreamMetadata_Picture *block, const FLAC__StreamMetadata_Picture *blockcopy);
  32. FLAC__bool mutils__compare_block_data_unknown(const FLAC__StreamMetadata_Unknown *block, const FLAC__StreamMetadata_Unknown *blockcopy, unsigned block_length);
  33. FLAC__bool mutils__compare_block(const FLAC__StreamMetadata *block, const FLAC__StreamMetadata *blockcopy);
  34. void mutils__init_metadata_blocks(
  35. FLAC__StreamMetadata *streaminfo,
  36. FLAC__StreamMetadata *padding,
  37. FLAC__StreamMetadata *seektable,
  38. FLAC__StreamMetadata *application1,
  39. FLAC__StreamMetadata *application2,
  40. FLAC__StreamMetadata *vorbiscomment,
  41. FLAC__StreamMetadata *cuesheet,
  42. FLAC__StreamMetadata *picture,
  43. FLAC__StreamMetadata *unknown
  44. );
  45. void mutils__free_metadata_blocks(
  46. FLAC__StreamMetadata *streaminfo,
  47. FLAC__StreamMetadata *padding,
  48. FLAC__StreamMetadata *seektable,
  49. FLAC__StreamMetadata *application1,
  50. FLAC__StreamMetadata *application2,
  51. FLAC__StreamMetadata *vorbiscomment,
  52. FLAC__StreamMetadata *cuesheet,
  53. FLAC__StreamMetadata *picture,
  54. FLAC__StreamMetadata *unknown
  55. );
  56. #endif