[xiph-commits] r14670 - trunk/ogg-tools/oggsplit

ivo at svn.xiph.org ivo at svn.xiph.org
Mon Apr 7 20:46:07 PDT 2008


Author: ivo
Date: 2008-04-07 20:46:07 -0700 (Mon, 07 Apr 2008)
New Revision: 14670

Modified:
   trunk/ogg-tools/oggsplit/oggsplit.c
   trunk/ogg-tools/oggsplit/stream.c
   trunk/ogg-tools/oggsplit/stream.h
Log:
Support for Kate streams.  Patch by ogg.k.ogg.k.

Modified: trunk/ogg-tools/oggsplit/oggsplit.c
===================================================================
--- trunk/ogg-tools/oggsplit/oggsplit.c	2008-04-08 03:18:26 UTC (rev 14669)
+++ trunk/ogg-tools/oggsplit/oggsplit.c	2008-04-08 03:46:07 UTC (rev 14670)
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
 #include <stdio.h>
@@ -42,7 +42,7 @@
 "  a flaw in the tool used to produce the file. If you believe this\n"
 "  is the case, make sure to report it to the author/maintainer of\n"
 "  that tool. Also note that as a consequence, some or all of the\n"
-"  files procuduces by this invocation of OggSplit may also be\n"
+"  files produced by this invocation of OggSplit may also be\n"
 "  invalid Ogg files.\n\n";
 
 const char *optstring="cgno:uVh";

Modified: trunk/ogg-tools/oggsplit/stream.c
===================================================================
--- trunk/ogg-tools/oggsplit/stream.c	2008-04-08 03:18:26 UTC (rev 14669)
+++ trunk/ogg-tools/oggsplit/stream.c	2008-04-08 03:46:07 UTC (rev 14670)
@@ -18,6 +18,7 @@
 const char *magic_theora = "\x80theora";
 const char *magic_speex  = "Speex";
 const char *magic_flac   = "fLaC";
+const char *magic_kate   = "\x80kate\0\0\0\0";
 
 int stream_ctrl_init(stream_ctrl_t *sc)
 {
@@ -57,6 +58,8 @@
     stream->type=STREAM_TYPE_SPEEX;
   else if(strncmp(og->body, magic_flac, strlen(magic_flac))==0)
     stream->type=STREAM_TYPE_FLAC;
+  else if(strncmp(og->body, magic_kate, sizeof(magic_kate)-1)==0)
+    stream->type=STREAM_TYPE_KATE;
   else
     stream->type=STREAM_TYPE_UNKNOWN;
 
@@ -112,6 +115,9 @@
   case STREAM_TYPE_FLAC:
     return "flac";
     break;
+  case STREAM_TYPE_KATE:
+    return "kate";
+    break;
   case STREAM_TYPE_UNKNOWN:
   default:
     return "unknown";

Modified: trunk/ogg-tools/oggsplit/stream.h
===================================================================
--- trunk/ogg-tools/oggsplit/stream.h	2008-04-08 03:18:26 UTC (rev 14669)
+++ trunk/ogg-tools/oggsplit/stream.h	2008-04-08 03:46:07 UTC (rev 14670)
@@ -20,6 +20,7 @@
 #define STREAM_TYPE_THEORA    0x02
 #define STREAM_TYPE_SPEEX     0x03
 #define STREAM_TYPE_FLAC      0x04
+#define STREAM_TYPE_KATE      0x05
 
 typedef struct {
   int    serial;



More information about the commits mailing list