[Vorbis-dev] Patch for ogginfo
Patrik Rådman
pradman
Mon Jul 5 15:13:23 PDT 2004
Hi all,
The attached patch for vorbis-tools/ogginfo/ does the following:
* Adds a missing \n to an info message.
* Adds minimal awareness of a few more stream types
* Changes "vorbis" in the output to "vorbis audio", to emphasize that
it's an audio codec.
I hope this is the proper process for submitting patches...
--
Patrik R?dman
patrik at iki dot fi
http://www.iki.fi/patrik/
-------------- next part --------------
Index: ogginfo2.c
===================================================================
--- ogginfo2.c (revision 6994)
+++ ogginfo2.c (working copy)
@@ -481,7 +481,7 @@
{
misc_vorbis_info *info;
- stream->type = "vorbis";
+ stream->type = "vorbis audio";
stream->process_page = vorbis_process;
stream->process_end = vorbis_end;
@@ -567,6 +567,18 @@
vorbis_start(stream);
else if(packet.bytes >= 8 && memcmp(packet.packet, "OggMIDI\0", 8)==0)
other_start(stream, "MIDI");
+ else if(packet.bytes >= 4 && memcmp(packet.packet, "fLaC", 4)==0)
+ other_start(stream, "FLAC audio");
+ else if(packet.bytes >= 8 && memcmp(packet.packet, "Speex ", 8)==0)
+ other_start(stream, "speex audio");
+ else if(packet.bytes >= 7 && memcmp(packet.packet, "\200theora", 7)==0)
+ other_start(stream, "theora video");
+ else if(packet.bytes >= 9 && memcmp(packet.packet, "\001video\0\0\0", 9)==0)
+ other_start(stream, "OGM video");
+ else if(packet.bytes >= 9 && memcmp(packet.packet, "\001audio\0\0\0", 9)==0)
+ other_start(stream, "OGM audio");
+ else if(packet.bytes >= 9 && memcmp(packet.packet, "\001text\0\0\0\0", 9)==0)
+ other_start(stream, "OGM subtitles");
else
other_start(stream, NULL);
@@ -587,7 +599,7 @@
if(stream->serial == 0 || stream->serial == -1) {
info(_("Note: Stream %d has serial number %d, which is legal but may "
- "cause problems with some tools."), stream->num, stream->serial);
+ "cause problems with some tools.\n"), stream->num, stream->serial);
}
return stream;
More information about the Vorbis-dev
mailing list