Mercurial > audlegacy-plugins
comparison src/madplug/input.c @ 738:6ea974a229a8 trunk
[svn] - add read/write support for TLEN frame.
author | yaz |
---|---|
date | Tue, 27 Feb 2007 04:17:49 -0800 |
parents | b938fe96b20e |
children | 5d8556c9949c |
comparison
equal
deleted
inserted
replaced
737:eecd54a11610 | 738:6ea974a229a8 |
---|---|
386 title_input->year = atoi(string); | 386 title_input->year = atoi(string); |
387 g_free(string); | 387 g_free(string); |
388 string = NULL; | 388 string = NULL; |
389 } | 389 } |
390 | 390 |
391 // length | |
392 title_input->length = -1; | |
393 string = input_id3_get_string(info->tag, "TLEN"); | |
394 if (string) { | |
395 title_input->length = atoi(string); | |
396 #ifdef DEBUG | |
397 printf("input_read_tag: TLEN = %d\n", title_input->length); | |
398 #endif | |
399 g_free(string); | |
400 string = NULL; | |
401 } | |
402 | |
391 title_input->file_name = g_strdup(g_basename(info->filename)); | 403 title_input->file_name = g_strdup(g_basename(info->filename)); |
392 title_input->file_path = g_path_get_dirname(info->filename); | 404 title_input->file_path = g_path_get_dirname(info->filename); |
393 if ((string = strrchr(title_input->file_name, '.'))) { | 405 if ((string = strrchr(title_input->file_name, '.'))) { |
394 title_input->file_ext = string + 1; | 406 title_input->file_ext = string + 1; |
395 *string = '\0'; // make filename end at dot. | 407 *string = '\0'; // make filename end at dot. |
406 gboolean input_get_info(struct mad_info_t *info, gboolean fast_scan) | 418 gboolean input_get_info(struct mad_info_t *info, gboolean fast_scan) |
407 { | 419 { |
408 #ifdef DEBUG | 420 #ifdef DEBUG |
409 g_message("f: input_get_info: %s, fast_scan = %s", info->title, fast_scan ? "TRUE" : "FALSE"); | 421 g_message("f: input_get_info: %s, fast_scan = %s", info->title, fast_scan ? "TRUE" : "FALSE"); |
410 #endif /* DEBUG */ | 422 #endif /* DEBUG */ |
423 | |
411 input_read_tag(info); | 424 input_read_tag(info); |
412 input_read_replaygain(info); | 425 input_read_replaygain(info); |
413 | 426 |
414 /* scan mp3 file, decoding headers unless fast_scan is set */ | 427 /* scan mp3 file, decoding headers */ |
415 if (scan_file(info, fast_scan) == FALSE) { | 428 if (scan_file(info, fast_scan) == FALSE) { |
416 return FALSE; | 429 return FALSE; |
417 } | 430 } |
431 | |
418 /* reset the input file to the start */ | 432 /* reset the input file to the start */ |
419 vfs_fseek(info->infile, 0, SEEK_SET); | 433 vfs_fseek(info->infile, 0, SEEK_SET); |
420 info->offset = 0; | 434 info->offset = 0; |
421 | 435 |
422 if(info->remote){ | 436 if(info->remote){ |