From: Andre Noll Date: Mon, 7 Dec 2009 17:07:21 +0000 (+0100) Subject: Merge commit 'meins/master' X-Git-Tag: v0.4.1~10 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=59cf2c9960d35d409a3610281b81b2e59ad7e5d1;hp=05527588bd503e4748d801b641a9e3a6556525ad Merge commit 'meins/master' --- diff --git a/NEWS b/NEWS index 3f6ae459..019f936e 100644 --- a/NEWS +++ b/NEWS @@ -5,7 +5,11 @@ NEWS 0.4.1 (to be announced) "concurrent eternalty" ---------------------------------------------- +Support for another audio format and bug fixes: All fixes that have +been accumulated in the 0.3.6 release appear in this release as well. + - wma support + - new afh option: --human to activate human-readable output ------------------------------------- 0.3.6 (2009-12-07) "cubic continuity" diff --git a/afh.c b/afh.c index c0064493..7fc32cd1 100644 --- a/afh.c +++ b/afh.c @@ -62,10 +62,25 @@ static void print_chunk_table(struct afh_info *afhi) { int i; - printf("chunk_table: "); - for (i = 0; i <= afhi->chunks_total; i++) - printf("%u ", afhi->chunk_table[i]); - printf("\n"); + if (!conf.human_given) { + printf("chunk_table: "); + for (i = 0; i <= afhi->chunks_total; i++) + printf("%u ", afhi->chunk_table[i]); + printf("\n"); + return; + } + for (i = 1; i <= afhi->chunks_total; i++) { + struct timeval tv; + long unsigned from, to; + tv_scale(i - 1, &afhi->chunk_tv, &tv); + from = tv2ms(&tv); + tv_scale(i, &afhi->chunk_tv, &tv); + to = tv2ms(&tv); + printf("%d [%lu.%03lu - %lu.%03lu] %u - %u (%u)\n", i, + from / 1000, from % 1000, to / 1000, to % 1000, + afhi->chunk_table[i - 1], afhi->chunk_table[i], + afhi->chunk_table[i] - afhi->chunk_table[i - 1]); + } } static int cat_file(void *audio_file_data, struct afh_info *afhi) diff --git a/ggo/afh.m4 b/ggo/afh.m4 index 97b8f288..80df8948 100644 --- a/ggo/afh.m4 +++ b/ggo/afh.m4 @@ -62,6 +62,20 @@ option "chunk_table" c flag off dependon="info" +option "human" u +#~~~~~~~~~~~~~~~ +"use human-readable output format" +flag off +dependon = "info" +details = " + Currently this option only affects the format of the chunk table, + so it has no effect if --chunk_table is not given. + + The human-readable output consists of one output line per + chunk and the output contains also the chunk number, the + duration and the size of each chunk. +" + section "Options for stream mode" #================================