[xiph-cvs] cvs commit: vorbis-tools/ogginfo ogginfo2.c
Michael Smith
msmith at xiph.org
Sun Jul 7 04:26:12 PDT 2002
msmith 02/07/07 04:26:12
Modified: ogginfo ogginfo2.c
Log:
Note what release a vorbis stream comes from, if the vendor tag corresponds
to a release.
Revision Changes Path
1.9 +27 -1 vorbis-tools/ogginfo/ogginfo2.c
Index: ogginfo2.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogginfo/ogginfo2.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ogginfo2.c 2002/07/06 07:07:24 1.8
+++ ogginfo2.c 2002/07/07 11:26:11 1.9
@@ -30,6 +30,21 @@
#define INT64FORMAT "%Ld"
#endif
+struct vorbis_release {
+ char *vendor_string;
+ char *desc;
+} releases[] = {
+ {"Xiphophorus libVorbis I 20000508", "1.0 beta 1 or beta 2"},
+ {"Xiphophorus libVorbis I 20001031", "1.0 beta 3"},
+ {"Xiphophorus libVorbis I 20010225", "1.0 beta 4"},
+ {"Xiphophorus libVorbis I 20010615", "1.0 rc1"},
+ {"Xiphophorus libVorbis I 20010813", "1.0 rc2"},
+ {"Xiphophorus libVorbis I 20011217", "1.0 rc3"},
+ {"Xiphophorus libVorbis I 20011231", "1.0 rc3"},
+ {NULL, NULL},
+ };
+
+
/* TODO:
*
* - detect decreasing granulepos
@@ -130,6 +145,7 @@
ogg_packet packet;
misc_vorbis_info *inf = stream->data;
int i, header=0;
+ int k;
ogg_stream_pagein(&stream->os, page);
@@ -152,7 +168,17 @@
"information follows...\n"), stream->num);
info(_("Version: %d\n"), inf->vi.version);
- info(_("Vendor: %s\n"), inf->vc.vendor);
+ k = 0;
+ while(releases[k].vendor_string) {
+ if(!strcmp(inf->vc.vendor, releases[k].vendor_string)) {
+ info(_("Vendor: %s (%s)\n"), inf->vc.vendor,
+ releases[k].desc);
+ break;
+ }
+ k++;
+ }
+ if(!releases[k].vendor_string)
+ info(_("Vendor: %s\n"), inf->vc.vendor);
info(_("Channels: %d\n"), inf->vi.channels);
info(_("Rate: %ld\n\n"), inf->vi.rate);
<p><p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list