Lines Matching refs:block1
695 static FLAC__bool compare_block_data_streaminfo_(const FLAC__StreamMetadata_StreamInfo *block1, con… in compare_block_data_streaminfo_() argument
697 if (block1->min_blocksize != block2->min_blocksize) in compare_block_data_streaminfo_()
699 if (block1->max_blocksize != block2->max_blocksize) in compare_block_data_streaminfo_()
701 if (block1->min_framesize != block2->min_framesize) in compare_block_data_streaminfo_()
703 if (block1->max_framesize != block2->max_framesize) in compare_block_data_streaminfo_()
705 if (block1->sample_rate != block2->sample_rate) in compare_block_data_streaminfo_()
707 if (block1->channels != block2->channels) in compare_block_data_streaminfo_()
709 if (block1->bits_per_sample != block2->bits_per_sample) in compare_block_data_streaminfo_()
711 if (block1->total_samples != block2->total_samples) in compare_block_data_streaminfo_()
713 if (memcmp(block1->md5sum, block2->md5sum, 16) != 0) in compare_block_data_streaminfo_()
718 static FLAC__bool compare_block_data_application_(const FLAC__StreamMetadata_Application *block1, c… in compare_block_data_application_() argument
720 FLAC__ASSERT(block1 != NULL); in compare_block_data_application_()
722 FLAC__ASSERT(block_length >= sizeof(block1->id)); in compare_block_data_application_()
724 if (memcmp(block1->id, block2->id, sizeof(block1->id)) != 0) in compare_block_data_application_()
726 if (block1->data != NULL && block2->data != NULL) in compare_block_data_application_()
727 return memcmp(block1->data, block2->data, block_length - sizeof(block1->id)) == 0; in compare_block_data_application_()
729 return block1->data == block2->data; in compare_block_data_application_()
732 static FLAC__bool compare_block_data_seektable_(const FLAC__StreamMetadata_SeekTable *block1, const… in compare_block_data_seektable_() argument
736 FLAC__ASSERT(block1 != NULL); in compare_block_data_seektable_()
739 if (block1->num_points != block2->num_points) in compare_block_data_seektable_()
742 if (block1->points != NULL && block2->points != NULL) { in compare_block_data_seektable_()
743 for (i = 0; i < block1->num_points; i++) { in compare_block_data_seektable_()
744 if (block1->points[i].sample_number != block2->points[i].sample_number) in compare_block_data_seektable_()
746 if (block1->points[i].stream_offset != block2->points[i].stream_offset) in compare_block_data_seektable_()
748 if (block1->points[i].frame_samples != block2->points[i].frame_samples) in compare_block_data_seektable_()
754 return block1->points == block2->points; in compare_block_data_seektable_()
757 …pare_block_data_vorbiscomment_(const FLAC__StreamMetadata_VorbisComment *block1, const FLAC__Strea… in compare_block_data_vorbiscomment_() argument
761 if (block1->vendor_string.length != block2->vendor_string.length) in compare_block_data_vorbiscomment_()
764 if (block1->vendor_string.entry != NULL && block2->vendor_string.entry != NULL) { in compare_block_data_vorbiscomment_()
765 …if (memcmp(block1->vendor_string.entry, block2->vendor_string.entry, block1->vendor_string.length)… in compare_block_data_vorbiscomment_()
768 else if (block1->vendor_string.entry != block2->vendor_string.entry) in compare_block_data_vorbiscomment_()
771 if (block1->num_comments != block2->num_comments) in compare_block_data_vorbiscomment_()
774 for (i = 0; i < block1->num_comments; i++) { in compare_block_data_vorbiscomment_()
775 if (block1->comments[i].entry != NULL && block2->comments[i].entry != NULL) { in compare_block_data_vorbiscomment_()
776 … if (memcmp(block1->comments[i].entry, block2->comments[i].entry, block1->comments[i].length) != 0) in compare_block_data_vorbiscomment_()
779 else if (block1->comments[i].entry != block2->comments[i].entry) in compare_block_data_vorbiscomment_()
785 static FLAC__bool compare_block_data_cuesheet_(const FLAC__StreamMetadata_CueSheet *block1, const F… in compare_block_data_cuesheet_() argument
789 if (strcmp(block1->media_catalog_number, block2->media_catalog_number) != 0) in compare_block_data_cuesheet_()
792 if (block1->lead_in != block2->lead_in) in compare_block_data_cuesheet_()
795 if (block1->is_cd != block2->is_cd) in compare_block_data_cuesheet_()
798 if (block1->num_tracks != block2->num_tracks) in compare_block_data_cuesheet_()
801 if (block1->tracks != NULL && block2->tracks != NULL) { in compare_block_data_cuesheet_()
802 FLAC__ASSERT(block1->num_tracks > 0); in compare_block_data_cuesheet_()
803 for (i = 0; i < block1->num_tracks; i++) { in compare_block_data_cuesheet_()
804 if (block1->tracks[i].offset != block2->tracks[i].offset) in compare_block_data_cuesheet_()
806 if (block1->tracks[i].number != block2->tracks[i].number) in compare_block_data_cuesheet_()
808 if (memcmp(block1->tracks[i].isrc, block2->tracks[i].isrc, sizeof(block1->tracks[i].isrc)) != 0) in compare_block_data_cuesheet_()
810 if (block1->tracks[i].type != block2->tracks[i].type) in compare_block_data_cuesheet_()
812 if (block1->tracks[i].pre_emphasis != block2->tracks[i].pre_emphasis) in compare_block_data_cuesheet_()
814 if (block1->tracks[i].num_indices != block2->tracks[i].num_indices) in compare_block_data_cuesheet_()
816 if (block1->tracks[i].indices != NULL && block2->tracks[i].indices != NULL) { in compare_block_data_cuesheet_()
817 FLAC__ASSERT(block1->tracks[i].num_indices > 0); in compare_block_data_cuesheet_()
818 for (j = 0; j < block1->tracks[i].num_indices; j++) { in compare_block_data_cuesheet_()
819 if (block1->tracks[i].indices[j].offset != block2->tracks[i].indices[j].offset) in compare_block_data_cuesheet_()
821 if (block1->tracks[i].indices[j].number != block2->tracks[i].indices[j].number) in compare_block_data_cuesheet_()
825 else if (block1->tracks[i].indices != block2->tracks[i].indices) in compare_block_data_cuesheet_()
829 else if (block1->tracks != block2->tracks) in compare_block_data_cuesheet_()
834 static FLAC__bool compare_block_data_picture_(const FLAC__StreamMetadata_Picture *block1, const FLA… in compare_block_data_picture_() argument
836 if (block1->type != block2->type) in compare_block_data_picture_()
838 …if (block1->mime_type != block2->mime_type && (block1->mime_type == 0 || block2->mime_type == 0 ||… in compare_block_data_picture_()
840 …if (block1->description != block2->description && (block1->description == 0 || block2->description… in compare_block_data_picture_()
842 if (block1->width != block2->width) in compare_block_data_picture_()
844 if (block1->height != block2->height) in compare_block_data_picture_()
846 if (block1->depth != block2->depth) in compare_block_data_picture_()
848 if (block1->colors != block2->colors) in compare_block_data_picture_()
850 if (block1->data_length != block2->data_length) in compare_block_data_picture_()
852 …if (block1->data != block2->data && (block1->data == NULL || block2->data == NULL || memcmp(block1… in compare_block_data_picture_()
857 static FLAC__bool compare_block_data_unknown_(const FLAC__StreamMetadata_Unknown *block1, const FLA… in compare_block_data_unknown_() argument
859 FLAC__ASSERT(block1 != NULL); in compare_block_data_unknown_()
862 if (block1->data != NULL && block2->data != NULL) in compare_block_data_unknown_()
863 return memcmp(block1->data, block2->data, block_length) == 0; in compare_block_data_unknown_()
865 return block1->data == block2->data; in compare_block_data_unknown_()
868 FLAC_API FLAC__bool FLAC__metadata_object_is_equal(const FLAC__StreamMetadata *block1, const FLAC__… in FLAC__metadata_object_is_equal() argument
870 FLAC__ASSERT(block1 != NULL); in FLAC__metadata_object_is_equal()
873 if (block1->type != block2->type) { in FLAC__metadata_object_is_equal()
876 if (block1->is_last != block2->is_last) { in FLAC__metadata_object_is_equal()
879 if (block1->length != block2->length) { in FLAC__metadata_object_is_equal()
882 switch(block1->type) { in FLAC__metadata_object_is_equal()
884 return compare_block_data_streaminfo_(&block1->data.stream_info, &block2->data.stream_info); in FLAC__metadata_object_is_equal()
888 …return compare_block_data_application_(&block1->data.application, &block2->data.application, block… in FLAC__metadata_object_is_equal()
890 return compare_block_data_seektable_(&block1->data.seek_table, &block2->data.seek_table); in FLAC__metadata_object_is_equal()
892 …return compare_block_data_vorbiscomment_(&block1->data.vorbis_comment, &block2->data.vorbis_commen… in FLAC__metadata_object_is_equal()
894 return compare_block_data_cuesheet_(&block1->data.cue_sheet, &block2->data.cue_sheet); in FLAC__metadata_object_is_equal()
896 return compare_block_data_picture_(&block1->data.picture, &block2->data.picture); in FLAC__metadata_object_is_equal()
898 return compare_block_data_unknown_(&block1->data.unknown, &block2->data.unknown, block1->length); in FLAC__metadata_object_is_equal()