[xiph-commits] r18469 - in icecast/trunk/libshout: include/shout src

ph3-der-loewe at svn.xiph.org ph3-der-loewe at svn.xiph.org
Wed Jul 18 15:35:58 PDT 2012


Author: ph3-der-loewe
Date: 2012-07-18 15:35:58 -0700 (Wed, 18 Jul 2012)
New Revision: 18469

Modified:
   icecast/trunk/libshout/include/shout/shout.h.in
   icecast/trunk/libshout/src/shout.c
Log:
added support for audio only webm, see #1872

Modified: icecast/trunk/libshout/include/shout/shout.h.in
===================================================================
--- icecast/trunk/libshout/include/shout/shout.h.in	2012-07-18 22:20:22 UTC (rev 18468)
+++ icecast/trunk/libshout/include/shout/shout.h.in	2012-07-18 22:35:58 UTC (rev 18469)
@@ -42,6 +42,7 @@
 #define SHOUT_FORMAT_OGG		(0) /* application/ogg */
 #define SHOUT_FORMAT_MP3		(1) /* audio/mpeg */
 #define SHOUT_FORMAT_WEBM		(2) /* video/webm */
+#define SHOUT_FORMAT_WEBMAUDIO		(3) /* audio/webm audio only */
 
 /* backward-compatibility alias */
 #define SHOUT_FORMAT_VORBIS	SHOUT_FORMAT_OGG

Modified: icecast/trunk/libshout/src/shout.c
===================================================================
--- icecast/trunk/libshout/src/shout.c	2012-07-18 22:20:22 UTC (rev 18468)
+++ icecast/trunk/libshout/src/shout.c	2012-07-18 22:35:58 UTC (rev 18469)
@@ -728,7 +728,8 @@
 
 	if (format != SHOUT_FORMAT_OGG
          && format != SHOUT_FORMAT_MP3
-	 && format != SHOUT_FORMAT_WEBM)
+	 && format != SHOUT_FORMAT_WEBM
+	 && format != SHOUT_FORMAT_WEBMAUDIO)
 		return self->error = SHOUTERR_UNSUPPORTED;
 
 	self->format = format;
@@ -1004,6 +1005,7 @@
                                 goto failure;
 			break;
 		case SHOUT_FORMAT_WEBM:
+		case SHOUT_FORMAT_WEBMAUDIO:
 			if ((rc = self->error = shout_open_webm(self)) != SHOUTERR_SUCCESS)
 				goto failure;
 			break;
@@ -1140,6 +1142,8 @@
 			break;
 		if (self->format == SHOUT_FORMAT_WEBM && queue_printf(self, "Content-Type: video/webm\r\n"))
 			break;
+		if (self->format == SHOUT_FORMAT_WEBMAUDIO && queue_printf(self, "Content-Type: audio/webm\r\n"))
+			break;
 		if (queue_printf(self, "ice-name: %s\r\n", self->name ? self->name : "no name"))
 			break;
 		if (queue_printf(self, "ice-public: %d\r\n", self->public))



More information about the commits mailing list