[xiph-cvs] cvs commit: vorbis-tools/ogginfo ogginfo2.c
Michael Smith
msmith at xiph.org
Sat Jun 22 09:23:46 PDT 2002
msmith 02/06/22 09:23:46
Modified: ogginfo ogginfo2.c
Log:
Some minor cleanups, and support for identifying (but not producing any
additional info about) ogg midi streams (as produced by oggmerge).
Revision Changes Path
1.2 +9 -10 vorbis-tools/ogginfo/ogginfo2.c
Index: ogginfo2.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogginfo/ogginfo2.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ogginfo2.c 2002/06/22 15:56:21 1.1
+++ ogginfo2.c 2002/06/22 16:23:46 1.2
@@ -189,9 +189,12 @@
return res;
}
-static void other_start(stream_processor *stream)
+static void other_start(stream_processor *stream, char *type)
{
- stream->type = "unknown";
+ if(type)
+ stream->type = type;
+ else
+ stream->type = "unknown";
stream->process_page = process_other;
stream->process_end = NULL;
}
@@ -280,15 +283,11 @@
}
if(packet.bytes >= 7 && memcmp(packet.packet, "\001vorbis", 7)==0)
- {
- fprintf(stderr, _("Stream %d is vorbis\n"), stream->num);
vorbis_start(stream);
- }
- else {
- fprintf(stderr, _("Stream %d is unidentified other type\n"),
- stream->num);
- other_start(stream);
- }
+ else if(packet.bytes >= 8 && memcmp(packet.packet, "OggMIDI\0", 8)==0)
+ other_start(stream, "MIDI");
+ else
+ other_start(stream, NULL);
res = ogg_stream_packetout(&stream->os, &packet);
if(res > 0) {
<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