[xiph-commits] r3752 - in libannodex/trunk/src: importers libannodex

conrad at svn.annodex.net conrad at svn.annodex.net
Wed Oct 29 04:06:33 PDT 2008


Author: conrad
Date: 2008-10-29 04:06:33 -0700 (Wed, 29 Oct 2008)
New Revision: 3752

Modified:
   libannodex/trunk/src/importers/anx_import_ogg.c
   libannodex/trunk/src/libannodex/content_type.c
Log:
add .ogv, .oga to known extensions


Modified: libannodex/trunk/src/importers/anx_import_ogg.c
===================================================================
--- libannodex/trunk/src/importers/anx_import_ogg.c	2008-10-29 11:06:26 UTC (rev 3751)
+++ libannodex/trunk/src/importers/anx_import_ogg.c	2008-10-29 11:06:33 UTC (rev 3752)
@@ -67,6 +67,9 @@
 /* RFC3534 */
 #define OGG_CONTENT_TYPE "application/ogg"
 
+#define OGA_CONTENT_TYPE "video/ogg"
+#define OGV_CONTENT_TYPE "audio/ogg"
+
 #define ANX_CONTENT_TYPE "application/annodex"
 
 #define CMML_CONTENT_TYPE "text/cmml"
@@ -1482,6 +1485,24 @@
   OGG_CONTENT_TYPE
 };
 
+static struct _AnxImporter anx_oga_importer = {
+  (AnxImporterOpenFunc)anxogg_open,
+  (AnxImporterOpenFDFunc)NULL,
+  (AnxImporterCloseFunc)anxogg_close,
+  (AnxImporterReadFunc)anxogg_read,
+  (AnxImporterSizeofNextReadFunc)anxogg_sizeof_next_read,
+  OGA_CONTENT_TYPE
+};
+
+static struct _AnxImporter anx_ogv_importer = {
+  (AnxImporterOpenFunc)anxogg_open,
+  (AnxImporterOpenFDFunc)NULL,
+  (AnxImporterCloseFunc)anxogg_close,
+  (AnxImporterReadFunc)anxogg_read,
+  (AnxImporterSizeofNextReadFunc)anxogg_sizeof_next_read,
+  OGV_CONTENT_TYPE
+};
+
 static struct _AnxImporter anx_anx_importer = {
   (AnxImporterOpenFunc)anxogg_open,
   (AnxImporterOpenFDFunc)NULL,
@@ -1525,12 +1546,16 @@
   case 0:
     return &anx_ogg_importer;
   case 1:
+    return &anx_oga_importer;
+  case 2:
+    return &anx_ogv_importer;
+  case 3:
     return &anx_anx_importer;
-  case 2:
+  case 4:
     return &anx_vorbis_importer;
-  case 3:
+  case 5:
     return &anx_speex_importer;
-  case 4:
+  case 6:
     return &anx_theora_importer;
   default:
     return NULL;

Modified: libannodex/trunk/src/libannodex/content_type.c
===================================================================
--- libannodex/trunk/src/libannodex/content_type.c	2008-10-29 11:06:26 UTC (rev 3751)
+++ libannodex/trunk/src/libannodex/content_type.c	2008-10-29 11:06:33 UTC (rev 3752)
@@ -179,6 +179,9 @@
   /* RFC3534 */
   if (!strncasecmp (ext, "ogg", 4)) return strdup ("application/ogg");
 
+  if (!strncasecmp (ext, "oga", 4)) return strdup ("audio/ogg");
+  if (!strncasecmp (ext, "ogv", 4)) return strdup ("video/ogg");
+
 #ifndef WIN32
   /* Scan ~/.mime.types first */
   if ((homedir = anx_get_homedir()) != NULL) {



More information about the commits mailing list