Lines Matching refs:metadata
316 static void verify_metadata_callback_(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data);
775 /* reorder metadata if necessary to ensure that any VORBIS_COMMENT is the first, according to the mapping spec */
776 if(is_ogg && 0 != encoder->protected_->metadata && encoder->protected_->num_metadata_blocks > 1) {
779 if(0 != encoder->protected_->metadata[i] && encoder->protected_->metadata[i]->type == FLAC__METADATA_TYPE_VORBIS_COMMENT) {
780 FLAC__StreamMetadata *vc = encoder->protected_->metadata[i];
782 encoder->protected_->metadata[i] = encoder->protected_->metadata[i-1];
783 encoder->protected_->metadata[0] = vc;
790 if(0 != encoder->protected_->metadata && encoder->protected_->num_metadata_blocks > 0) {
793 if(0 != encoder->protected_->metadata[i] && encoder->protected_->metadata[i]->type == FLAC__METADATA_TYPE_SEEKTABLE) {
794 encoder->private_->seek_table = &encoder->protected_->metadata[i]->data.seek_table;
800 /* validate metadata */
801 if(0 == encoder->protected_->metadata && encoder->protected_->num_metadata_blocks > 0)
808 const FLAC__StreamMetadata *m = encoder->protected_->metadata[i];
1026 * These must be done before we write any metadata, because that
1050 * write the STREAMINFO metadata block
1086 * Check to see if the supplied metadata contains a VORBIS_COMMENT;
1092 * true it will have already insured that the metadata list is properly
1115 * write the user's metadata blocks
1118 encoder->protected_->metadata[i]->is_last = (i == encoder->protected_->num_metadata_blocks - 1);
1119 if(!FLAC__add_metadata_block(encoder->protected_->metadata[i], encoder->private_->frame)) {
1129 /* now that all the metadata is written, we save the stream offset */
1349 /* check if an error occurred while updating metadata */
1717 FLAC_API FLAC__bool FLAC__stream_encoder_set_metadata(FLAC__StreamEncoder *encoder, FLAC__StreamMetadata **metadata, unsigned num_blocks)
1724 if(0 == metadata)
1727 metadata = 0;
1729 if(encoder->protected_->metadata) {
1730 free(encoder->protected_->metadata);
1731 encoder->protected_->metadata = 0;
1738 memcpy(m, metadata, sizeof(m[0]) * num_blocks);
1739 encoder->protected_->metadata = m;
2150 encoder->protected_->metadata = 0;
2178 if(encoder->protected_->metadata) {
2179 free(encoder->protected_->metadata);
2180 encoder->protected_->metadata = 0;
2459 * means we're still writing metadata and haven't hit the first
2482 * just before writing the seektable back to the metadata.
2513 * when the encoder goes back to write metadata, 'current_frame'
2528 const FLAC__StreamMetadata *metadata = &encoder->private_->streaminfo;
2529 const FLAC__uint64 samples = metadata->data.stream_info.total_samples;
2530 const unsigned min_framesize = metadata->data.stream_info.min_framesize;
2531 const unsigned max_framesize = metadata->data.stream_info.max_framesize;
2532 const unsigned bps = metadata->data.stream_info.bits_per_sample;
2535 FLAC__ASSERT(metadata->type == FLAC__METADATA_TYPE_STREAMINFO);
2564 if(encoder->private_->write_callback(encoder, metadata->data.stream_info.md5sum, 16, 0, 0, encoder->private_->client_data) != FLAC__STREAM_ENCODER_WRITE_STATUS_OK) {
2693 const FLAC__StreamMetadata *metadata = &encoder->private_->streaminfo;
2694 const FLAC__uint64 samples = metadata->data.stream_info.total_samples;
2695 const unsigned min_framesize = metadata->data.stream_info.min_framesize;
2696 const unsigned max_framesize = metadata->data.stream_info.max_framesize;
2699 FLAC__ASSERT(metadata->type == FLAC__METADATA_TYPE_STREAMINFO);
2745 memcpy(page.body + md5_offset, metadata->data.stream_info.md5sum, 16);
4244 void verify_metadata_callback_(const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data)
4246 (void)decoder, (void)metadata, (void)client_data;