{
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)
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"
#================================