Lines Matching defs:psf
73 vorbiscomment_read_tags (SF_PRIVATE *psf, ogg_packet *packet, vorbiscomment_ident *ident)
94 { psf_log_printf (psf, "Expected comment packet identifier missing.\n") ;
106 psf_log_printf (psf, "VorbisComment Metadata\n") ;
129 psf_log_printf (psf, " Vendor: %s\n", tag) ;
159 psf_log_printf (psf, " %s\n", tag) ;
166 { psf_log_printf (psf, "Malformed Vorbis comment, no '=' found.\n") ;
171 psf_store_string (psf, id, c + 1) ;
181 vorbiscomment_write_tags (SF_PRIVATE *psf, ogg_packet *packet, vorbiscomment_ident *ident, const char *vendor, int targetsize)
187 psf->header.ptr [0] = 0 ;
188 psf->header.indx = 0 ;
192 psf_binheader_writef (psf, "eb", BHWv (ident->ident), BHWz (ident->length)) ;
196 psf_binheader_writef (psf, "e4b", BHW4 (tag_name_len), BHWv (vendor), BHWz (tag_name_len)) ;
199 tags_start = psf->header.indx ;
200 psf_binheader_writef (psf, "j", BHWj (4)) ;
205 { if (psf->strings.data [i].type == 0)
208 tag_name = vorbiscomment_lookup_name (psf->strings.data [i].type) ;
213 tag_body_len = strlen (psf->strings.storage + psf->strings.data [i].offset) ;
214 if (targetsize > 0 && tag_name_len + tag_body_len + psf->header.indx > targetsize)
218 psf_binheader_writef (psf, "e4b1b",
222 BHWv (psf->strings.storage + psf->strings.data [i].offset), BHWz (tag_body_len)) ;
233 psf_binheader_writef (psf, "z", BHWz ((psf->header.indx + -targetsize + 255) / 255 * 255 - 1)) ;
236 psf_binheader_writef (psf, "z", BHWz (targetsize - psf->header.indx)) ;
238 packet->packet = psf->header.ptr ;
239 packet->bytes = psf->header.indx ;
244 psf_binheader_writef (psf, "eo4", BHWo (tags_start), BHW4 (ntags)) ;