Commit 1918ff86 authored by conrad's avatar conrad

Add codec name to oggzinfo output


git-svn-id: http://svn.annodex.net/liboggz/trunk@1062 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent 7a84e0e1
......@@ -36,6 +36,8 @@
#include <math.h>
#include <oggz/oggz.h>
#include "oggz_tools.h"
#ifndef WIN32
#include <inttypes.h>
#else
......@@ -71,6 +73,7 @@ struct _OI_Stats {
struct _OI_TrackInfo {
OI_Stats pages;
OI_Stats packets;
const char * codec_name;
};
static void
......@@ -137,7 +140,7 @@ oi_stats_print (OI_Info * info, OI_Stats * stats, char * label)
static void
oit_print (OI_Info * info, OI_TrackInfo * oit, long serialno)
{
printf ("%010ld:\n", serialno);
printf ("%s: serialno %010ld\n", oit->codec_name, serialno);
printf ("\t%ld packets in %ld pages, %.3f packets/page\n",
oit->packets.count, oit->pages.count,
......@@ -197,6 +200,10 @@ read_page_pass1 (OGGZ * oggz, const ogg_page * og, long serialno, void * user_da
oggz_table_insert (info->tracks, serialno, oit);
}
if (ogg_page_bos ((ogg_page *)og)) {
oit->codec_name = ot_page_identify (og);
}
bytes = og->header_len + og->body_len;
/* Increment the total stream length */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment