[libshout] Add mime/content-type parameter

View: New views
12 Messages — Rating Filter:   Alert me  

[libshout] Add mime/content-type parameter

by Romain Beauxis-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

        Hi all !

While trying to read ogg data from various audio players, it sometimes appear
that the player needs a different mime type than libshout's
default, "application/ogg". For instance, I already saw:
  "application/x-ogg";"audio/x-ogg"

Currently, libshout has a built-in Content-Type parameter, that is
set according to the given format integer.

I would like to propose a backward compatible patch that adds a mime
parameter to shout_t and the corresponding set/get functions.

This parameter is set to default values when calling set_format, so the
behaviour is 100% backward compatible, only it adds more flexibility to
libshout.

What do you think ?


Romain

--- libshout-2.2.2/src/shout.c 2006-06-10 01:09:46.000000000 +0200
+++ libshout-2.2.2.mime/src/shout.c 2008-09-20 13:49:16.000000000 +0200
@@ -113,8 +113,13 @@
  return NULL;
  }
 
+ if (shout_set_format(self, LIBSHOUT_DEFAULT_FORMAT) != SHOUTERR_SUCCESS) {
+ shout_free(self);
+
+ return NULL;
+ }
+
  self->port = LIBSHOUT_DEFAULT_PORT;
- self->format = LIBSHOUT_DEFAULT_FORMAT;
  self->protocol = LIBSHOUT_DEFAULT_PROTOCOL;
 
  return self;
@@ -134,6 +139,7 @@
  if (self->user) free(self->user);
  if (self->useragent) free(self->useragent);
  if (self->audio_info) _shout_util_dict_free (self->audio_info);
+ if (self->mime) free(self->mime);
 
  free(self);
 }
@@ -710,6 +716,31 @@
  return self->public;
 }
 
+int shout_set_mime(shout_t *self, const char *mime)
+{
+ if (!self)
+ return SHOUTERR_INSANE;
+
+ if (self->state != SHOUT_STATE_UNCONNECTED)
+ return SHOUTERR_CONNECTED;
+
+ if (self->mime)
+ free(self->mime);
+
+ if (! (self->mime = _shout_util_strdup (mime)))
+ return self->error = SHOUTERR_MALLOC;
+
+ return self->error = SHOUTERR_SUCCESS;
+}
+
+const char *shout_get_mime(shout_t *self)
+{
+ if (!self)
+ return NULL;
+
+ return self->mime;
+}
+
 int shout_set_format(shout_t *self, unsigned int format)
 {
  if (!self)
@@ -723,7 +754,15 @@
 
  self->format = format;
 
- return self->error = SHOUTERR_SUCCESS;
+ /* Set decent value for mime. */
+ switch (format) {
+ case SHOUT_FORMAT_OGG:
+ return shout_set_mime(self,SHOUT_OGG_MIME);
+ case SHOUT_FORMAT_MP3:
+ return shout_set_mime(self,SHOUT_MP3_MIME);
+ }
+
+ return self->error = SHOUTERR_INSANE;
 }
 
 unsigned int shout_get_format(shout_t* self)
@@ -1116,9 +1155,7 @@
  }
  if (self->useragent && queue_printf(self, "User-Agent: %s\r\n", self->useragent))
  break;
- if (self->format == SHOUT_FORMAT_OGG && queue_printf(self, "Content-Type: application/ogg\r\n"))
- break;
- if (self->format == SHOUT_FORMAT_MP3 && queue_printf(self, "Content-Type: audio/mpeg\r\n"))
+ if (self->mime && queue_printf(self, "Content-Type: %s\r\n", self->mime))
  break;
  if (queue_printf(self, "ice-name: %s\r\n", self->name ? self->name : "no name"))
  break;
--- libshout-2.2.2/src/shout_private.h 2005-06-27 23:33:25.000000000 +0200
+++ libshout-2.2.2.mime/src/shout_private.h 2008-09-20 13:51:20.000000000 +0200
@@ -65,6 +65,8 @@
  unsigned int protocol;
  /* type of data being sent */
  unsigned int format;
+ /* Mime type for data */
+ char *mime;
  /* audio encoding parameters */
  util_dict *audio_info;
 
--- libshout-2.2.2/include/shout/shout.h.in 2005-06-27 23:33:21.000000000 +0200
+++ libshout-2.2.2.mime/include/shout/shout.h.in 2008-09-20 13:53:11.000000000 +0200
@@ -44,6 +44,10 @@
 /* backward-compatibility alias */
 #define SHOUT_FORMAT_VORBIS SHOUT_FORMAT_OGG
 
+/* Default mime types */
+#define SHOUT_OGG_MIME          "application/ogg"
+#define SHOUT_MP3_MIME          "audio/mpeg"
+
 #define SHOUT_PROTOCOL_HTTP (0)
 #define SHOUT_PROTOCOL_XAUDIOCAST (1)
 #define SHOUT_PROTOCOL_ICY (2)
@@ -135,6 +139,14 @@
 int shout_set_format(shout_t *self, unsigned int format);
 unsigned int shout_get_format(shout_t *self);
 
+/* Set the data's mime type.
+ * This value is set to a decent value by
+ * shout_set_format. Using this function
+ * is optional and should be done after
+ * calling shout_set_format. */
+int shout_set_mime(shout_t *self, const char *mime);
+const char *shout_get_mime(shout_t *self);
+
 /* takes a SHOUT_PROTOCOL_xxxxx argument */
 int shout_set_protocol(shout_t *self, unsigned int protocol);
 unsigned int shout_get_protocol(shout_t *self);

_______________________________________________
Icecast-dev mailing list
Icecast-dev@...
http://lists.xiph.org/mailman/listinfo/icecast-dev

Re: [libshout] Add mime/content-type parameter

by Saoshyant :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It seems like a fine patch, but you need to revise it because
video/ogg and audio/ogg are registered media types for Ogg streams
too.  This, of course, is something recent, so don't blame yourself if
you haven't heard.

For those who need more details on what media type to use on what
situation, read RFC 5334.

-Ivo
_______________________________________________
Icecast-dev mailing list
Icecast-dev@...
http://lists.xiph.org/mailman/listinfo/icecast-dev

Re: [libshout] Add mime/content-type parameter

by Romain Beauxis-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

        Hi !

Le Monday 22 September 2008 18:32:57 Ivo Emanuel Gonçalves, vous avez écrit :
> It seems like a fine patch, but you need to revise it because
> video/ogg and audio/ogg are registered media types for Ogg streams
> too.  This, of course, is something recent, so don't blame yourself if
> you haven't heard.

Thanks for the review !

I don't get where the patch should be changed ? The default mime value for ogg
streams ?


Romain
_______________________________________________
Icecast-dev mailing list
Icecast-dev@...
http://lists.xiph.org/mailman/listinfo/icecast-dev

Re: [libshout] Add mime/content-type parameter

by Saoshyant :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 9/22/08, Romain Beauxis <toots@...> wrote:
> I don't get where the patch should be changed ? The default mime value for
> ogg streams ?

Yep.  Any of the three media types should be allowed.  There is simply
no "default mime" anymore.

application/ogg is now for applications and (very) complex multimedia.
video/ogg is for video and audio, say films.
audio/ogg is for anything audio, be it Vorbis, Speex, FLAC, whatever.

If libshout can only do audio (I thought it could do video too, but
apparently I'm wrong) the default should be audio/ogg, with
application/ogg available as a legacy option for a couple of years
until all software updates to use audio/ogg exclusively.

-Ivo
_______________________________________________
Icecast-dev mailing list
Icecast-dev@...
http://lists.xiph.org/mailman/listinfo/icecast-dev

Re: [libshout] Add mime/content-type parameter

by Romain Beauxis-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Le Monday 22 September 2008 18:48:34 Ivo Emanuel Gonçalves, vous avez écrit :

> On 9/22/08, Romain Beauxis <toots@...> wrote:
> > I don't get where the patch should be changed ? The default mime value
> > for ogg streams ?
>
> Yep.  Any of the three media types should be allowed.  There is simply
> no "default mime" anymore.
>
> application/ogg is now for applications and (very) complex multimedia.
> video/ogg is for video and audio, say films.
> audio/ogg is for anything audio, be it Vorbis, Speex, FLAC, whatever.
>
> If libshout can only do audio (I thought it could do video too, but
> apparently I'm wrong)

I believe it can.

> the default should be audio/ogg, with
> application/ogg available as a legacy option for a couple of years
> until all software updates to use audio/ogg exclusively.

Humm..
So default mime would remain "application/ogg", but "audio/ogg"
and "video/ogg" should be documented, right ?

It is also be possible to add new formats, which would be:
 * SHOUT_FORMAT_OGG_AUDIO
 * SHOUT_FORMAT_OGG_VIDEO
with the corresponding default mimes...

(I don't like this since the formats no longer have the same semantics)

This could

Romain
_______________________________________________
Icecast-dev mailing list
Icecast-dev@...
http://lists.xiph.org/mailman/listinfo/icecast-dev

Re: [libshout] Add mime/content-type parameter

by Romain Beauxis-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Le Monday 22 September 2008 19:04:48 Romain Beauxis, vous avez écrit :

> Humm..
> So default mime would remain "application/ogg", but "audio/ogg"
> and "video/ogg" should be documented, right ?
>
> It is also be possible to add new formats, which would be:
>  * SHOUT_FORMAT_OGG_AUDIO
>  * SHOUT_FORMAT_OGG_VIDEO
> with the corresponding default mimes...
>
> (I don't like this since the formats no longer have the same semantics)
Ok, please find attached the two possibilities.

First patch is 100% backward compatible, and only documents the new audio/ogg
and video/ogg mime types.

Second patch is not backward compatible and sets "audio/ogg" if you used the
deprecated SHOUT_FORMAT_VORBIS.
Furthermore, it adds new shout formats for ogg sub-types, namely
 * SHOUT_FORMAT_OGG_AUDIO
 * SHOUT_FORMAT_OGG_VIDEO

Mime types are set accordingly for these formats, and SHOUT_FORMAT_VORBIS is
then alised to SHOUT_FORMAT_OGG_AUDIO.

What do you think, may one of them qualify for an inclusion ?


Romain

diff -ruN libshout-2.2.2/include/shout/shout.h.in libshout-2.2.2.backward/include/shout/shout.h.in
--- libshout-2.2.2/include/shout/shout.h.in 2005-06-27 23:33:21.000000000 +0200
+++ libshout-2.2.2.backward/include/shout/shout.h.in 2008-09-24 10:12:46.000000000 +0200
@@ -44,6 +44,13 @@
 /* backward-compatibility alias */
 #define SHOUT_FORMAT_VORBIS SHOUT_FORMAT_OGG
 
+/* Default mime types */
+#define SHOUT_OGG_MIME          "application/ogg"
+#define SHOUT_MP3_MIME          "audio/mpeg"
+/* Ogg specific mime types */
+#define SHOUT_OGG_AUDIO_MIME    "audio/ogg"
+#define SHOUT_OGG_VIDEO_MIME    "video/ogg"
+
 #define SHOUT_PROTOCOL_HTTP (0)
 #define SHOUT_PROTOCOL_XAUDIOCAST (1)
 #define SHOUT_PROTOCOL_ICY (2)
@@ -135,6 +142,14 @@
 int shout_set_format(shout_t *self, unsigned int format);
 unsigned int shout_get_format(shout_t *self);
 
+/* Set the data's mime type.
+ * This value is set to a decent value by
+ * shout_set_format. Using this function
+ * is optional and should be done after
+ * calling shout_set_format. */
+int shout_set_mime(shout_t *self, const char *mime);
+const char *shout_get_mime(shout_t *self);
+
 /* takes a SHOUT_PROTOCOL_xxxxx argument */
 int shout_set_protocol(shout_t *self, unsigned int protocol);
 unsigned int shout_get_protocol(shout_t *self);
diff -ruN libshout-2.2.2/src/shout.c libshout-2.2.2.backward/src/shout.c
--- libshout-2.2.2/src/shout.c 2006-06-10 01:09:46.000000000 +0200
+++ libshout-2.2.2.backward/src/shout.c 2008-09-24 10:11:20.000000000 +0200
@@ -113,8 +113,13 @@
  return NULL;
  }
 
+ if (shout_set_format(self, LIBSHOUT_DEFAULT_FORMAT) != SHOUTERR_SUCCESS) {
+ shout_free(self);
+
+ return NULL;
+ }
+
  self->port = LIBSHOUT_DEFAULT_PORT;
- self->format = LIBSHOUT_DEFAULT_FORMAT;
  self->protocol = LIBSHOUT_DEFAULT_PROTOCOL;
 
  return self;
@@ -134,6 +139,7 @@
  if (self->user) free(self->user);
  if (self->useragent) free(self->useragent);
  if (self->audio_info) _shout_util_dict_free (self->audio_info);
+ if (self->mime) free(self->mime);
 
  free(self);
 }
@@ -710,6 +716,31 @@
  return self->public;
 }
 
+int shout_set_mime(shout_t *self, const char *mime)
+{
+ if (!self)
+ return SHOUTERR_INSANE;
+
+ if (self->state != SHOUT_STATE_UNCONNECTED)
+ return SHOUTERR_CONNECTED;
+
+ if (self->mime)
+ free(self->mime);
+
+ if (! (self->mime = _shout_util_strdup (mime)))
+ return self->error = SHOUTERR_MALLOC;
+
+ return self->error = SHOUTERR_SUCCESS;
+}
+
+const char *shout_get_mime(shout_t *self)
+{
+ if (!self)
+ return NULL;
+
+ return self->mime;
+}
+
 int shout_set_format(shout_t *self, unsigned int format)
 {
  if (!self)
@@ -723,7 +754,15 @@
 
  self->format = format;
 
- return self->error = SHOUTERR_SUCCESS;
+ /* Set decent value for mime. */
+ switch (format) {
+ case SHOUT_FORMAT_OGG:
+ return shout_set_mime(self,SHOUT_OGG_MIME);
+ case SHOUT_FORMAT_MP3:
+ return shout_set_mime(self,SHOUT_MP3_MIME);
+ }
+
+ return self->error = SHOUTERR_INSANE;
 }
 
 unsigned int shout_get_format(shout_t* self)
@@ -1116,9 +1155,7 @@
  }
  if (self->useragent && queue_printf(self, "User-Agent: %s\r\n", self->useragent))
  break;
- if (self->format == SHOUT_FORMAT_OGG && queue_printf(self, "Content-Type: application/ogg\r\n"))
- break;
- if (self->format == SHOUT_FORMAT_MP3 && queue_printf(self, "Content-Type: audio/mpeg\r\n"))
+ if (self->mime && queue_printf(self, "Content-Type: %s\r\n", self->mime))
  break;
  if (queue_printf(self, "ice-name: %s\r\n", self->name ? self->name : "no name"))
  break;
diff -ruN libshout-2.2.2/src/shout_private.h libshout-2.2.2.backward/src/shout_private.h
--- libshout-2.2.2/src/shout_private.h 2005-06-27 23:33:25.000000000 +0200
+++ libshout-2.2.2.backward/src/shout_private.h 2008-09-24 10:11:20.000000000 +0200
@@ -65,6 +65,8 @@
  unsigned int protocol;
  /* type of data being sent */
  unsigned int format;
+ /* Mime type for data */
+ char *mime;
  /* audio encoding parameters */
  util_dict *audio_info;
 

--- libshout-2.2.2/include/shout/shout.h.in 2005-06-27 23:33:21.000000000 +0200
+++ libshout-2.2.2.newtypes/include/shout/shout.h.in 2008-09-24 10:16:41.000000000 +0200
@@ -39,11 +39,28 @@
 
 #define SHOUTERR_BUSY (-10)
 
+/* Main ogg format, sets mime type to
+ * SHOUT_OGG_MIME by default */
 #define SHOUT_FORMAT_OGG (0)
 #define SHOUT_FORMAT_MP3 (1)
+/* Specific sub-formats for ogg */
+/* Ogg stream with audio data.
+ * Sets mime type to SHOUT_OGG_AUDIO_MIME
+ * by default */
+#define SHOUT_FORMAT_OGG_AUDIO  (2)
+/* Ogg stream with video and possibly
+ * audio */
+#define SHOUT_FORMAT_OGG_VIDEO  (3)
 /* backward-compatibility alias */
 #define SHOUT_FORMAT_VORBIS SHOUT_FORMAT_OGG
 
+/* Default mime types */
+#define SHOUT_OGG_MIME          "application/ogg"
+#define SHOUT_MP3_MIME          "audio/mpeg"
+/* Ogg specific mime types */
+#define SHOUT_OGG_AUDIO_MIME    "audio/ogg"
+#define SHOUT_OGG_VIDEO_MIME    "video/ogg"
+
 #define SHOUT_PROTOCOL_HTTP (0)
 #define SHOUT_PROTOCOL_XAUDIOCAST (1)
 #define SHOUT_PROTOCOL_ICY (2)
@@ -135,6 +152,14 @@
 int shout_set_format(shout_t *self, unsigned int format);
 unsigned int shout_get_format(shout_t *self);
 
+/* Set the data's mime type.
+ * This value is set to a decent value by
+ * shout_set_format. Using this function
+ * is optional and should be done after
+ * calling shout_set_format. */
+int shout_set_mime(shout_t *self, const char *mime);
+const char *shout_get_mime(shout_t *self);
+
 /* takes a SHOUT_PROTOCOL_xxxxx argument */
 int shout_set_protocol(shout_t *self, unsigned int protocol);
 unsigned int shout_get_protocol(shout_t *self);
--- libshout-2.2.2/src/shout_private.h 2005-06-27 23:33:25.000000000 +0200
+++ libshout-2.2.2.newtypes/src/shout_private.h 2008-09-24 10:13:27.000000000 +0200
@@ -65,6 +65,8 @@
  unsigned int protocol;
  /* type of data being sent */
  unsigned int format;
+ /* Mime type for data */
+ char *mime;
  /* audio encoding parameters */
  util_dict *audio_info;
 
--- libshout-2.2.2/src/shout.c 2006-06-10 01:09:46.000000000 +0200
+++ libshout-2.2.2.newtypes/src/shout.c 2008-09-24 10:22:36.000000000 +0200
@@ -113,8 +113,13 @@
  return NULL;
  }
 
+ if (shout_set_format(self, LIBSHOUT_DEFAULT_FORMAT) != SHOUTERR_SUCCESS) {
+ shout_free(self);
+
+ return NULL;
+ }
+
  self->port = LIBSHOUT_DEFAULT_PORT;
- self->format = LIBSHOUT_DEFAULT_FORMAT;
  self->protocol = LIBSHOUT_DEFAULT_PROTOCOL;
 
  return self;
@@ -134,6 +139,7 @@
  if (self->user) free(self->user);
  if (self->useragent) free(self->useragent);
  if (self->audio_info) _shout_util_dict_free (self->audio_info);
+ if (self->mime) free(self->mime);
 
  free(self);
 }
@@ -147,7 +153,7 @@
  return SHOUTERR_CONNECTED;
  if (!self->host || !self->password || !self->port)
  return self->error = SHOUTERR_INSANE;
- if (self->format == SHOUT_FORMAT_OGG && self->protocol != SHOUT_PROTOCOL_HTTP)
+ if (self->format != SHOUT_FORMAT_MP3 && self->protocol != SHOUT_PROTOCOL_HTTP)
  return self->error = SHOUTERR_UNSUPPORTED;
 
  return self->error = try_connect(self);
@@ -710,6 +716,31 @@
  return self->public;
 }
 
+int shout_set_mime(shout_t *self, const char *mime)
+{
+ if (!self)
+ return SHOUTERR_INSANE;
+
+ if (self->state != SHOUT_STATE_UNCONNECTED)
+ return SHOUTERR_CONNECTED;
+
+ if (self->mime)
+ free(self->mime);
+
+ if (! (self->mime = _shout_util_strdup (mime)))
+ return self->error = SHOUTERR_MALLOC;
+
+ return self->error = SHOUTERR_SUCCESS;
+}
+
+const char *shout_get_mime(shout_t *self)
+{
+ if (!self)
+ return NULL;
+
+ return self->mime;
+}
+
 int shout_set_format(shout_t *self, unsigned int format)
 {
  if (!self)
@@ -718,12 +749,27 @@
  if (self->state != SHOUT_STATE_UNCONNECTED)
  return self->error = SHOUTERR_CONNECTED;
 
- if (format != SHOUT_FORMAT_OGG && format != SHOUT_FORMAT_MP3)
+ if (format != SHOUT_FORMAT_OGG &&
+    format != SHOUT_FORMAT_OGG_AUDIO &&
+    format != SHOUT_FORMAT_OGG_VIDEO &&
+    format != SHOUT_FORMAT_MP3)
  return self->error = SHOUTERR_UNSUPPORTED;
 
  self->format = format;
 
- return self->error = SHOUTERR_SUCCESS;
+ /* Set decent value for mime. */
+ switch (format) {
+ case SHOUT_FORMAT_OGG:
+ return shout_set_mime(self,SHOUT_OGG_MIME);
+ case SHOUT_FORMAT_OGG_AUDIO:
+ return shout_set_mime(self,SHOUT_OGG_AUDIO_MIME);
+ case SHOUT_FORMAT_OGG_VIDEO:
+ return shout_set_mime(self,SHOUT_OGG_VIDEO_MIME);
+ case SHOUT_FORMAT_MP3:
+ return shout_set_mime(self,SHOUT_MP3_MIME);
+ }
+
+ return self->error = SHOUTERR_INSANE;
 }
 
 unsigned int shout_get_format(shout_t* self)
@@ -984,7 +1030,10 @@
  if ((rc = parse_response(self)) != SHOUTERR_SUCCESS)
                         goto failure;
 
- if (self->format == SHOUT_FORMAT_OGG) {
+ if (self->format == SHOUT_FORMAT_OGG ||
+    self->format == SHOUT_FORMAT_OGG_AUDIO ||
+    self->format == SHOUT_FORMAT_OGG_VIDEO )
+ {
  if ((rc = self->error = shout_open_ogg(self)) != SHOUTERR_SUCCESS)
                                 goto failure;
  } else if (self->format == SHOUT_FORMAT_MP3) {
@@ -1116,9 +1165,7 @@
  }
  if (self->useragent && queue_printf(self, "User-Agent: %s\r\n", self->useragent))
  break;
- if (self->format == SHOUT_FORMAT_OGG && queue_printf(self, "Content-Type: application/ogg\r\n"))
- break;
- if (self->format == SHOUT_FORMAT_MP3 && queue_printf(self, "Content-Type: audio/mpeg\r\n"))
+ if (self->mime && queue_printf(self, "Content-Type: %s\r\n", self->mime))
  break;
  if (queue_printf(self, "ice-name: %s\r\n", self->name ? self->name : "no name"))
  break;

_______________________________________________
Icecast-dev mailing list
Icecast-dev@...
http://lists.xiph.org/mailman/listinfo/icecast-dev

Re: [libshout] Add mime/content-type parameter

by ogg.k.ogg.k@googlemail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> If libshout can only do audio (I thought it could do video too, but

It can forward Theora just fine. I've tried it a few months ago through
icecast and the supplied example.
_______________________________________________
Icecast-dev mailing list
Icecast-dev@...
http://lists.xiph.org/mailman/listinfo/icecast-dev

Re: [libshout] Add mime/content-type parameter

by Saoshyant :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 9/24/08, Romain Beauxis <toots@...> wrote:
> First patch is 100% backward compatible, and only documents the new
> audio/ogg and video/ogg mime types.

"Documents" doesn't sound good.  A quick look at the patch seems to
imply that libshout doesn't act on those two.

> Second patch is not backward compatible and sets "audio/ogg" if you used the
> deprecated SHOUT_FORMAT_VORBIS.
> Furthermore, it adds new shout formats for ogg sub-types, namely
>  * SHOUT_FORMAT_OGG_AUDIO
>  * SHOUT_FORMAT_OGG_VIDEO
>
> Mime types are set accordingly for these formats, and SHOUT_FORMAT_VORBIS is
> then alised to SHOUT_FORMAT_OGG_AUDIO.

This sounds like a better approach.  When you say it's not
backward-compatible, do you reckon something would break?

I hope libshout doesn't require rewriting some parts.

-Ivo
_______________________________________________
Icecast-dev mailing list
Icecast-dev@...
http://lists.xiph.org/mailman/listinfo/icecast-dev

Re: [libshout] Add mime/content-type parameter

by Romain Beauxis-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Le Thursday 25 September 2008 23:00:20 Ivo Emanuel Gonçalves, vous avez
écrit :
> > Mime types are set accordingly for these formats, and SHOUT_FORMAT_VORBIS
> > is then alised to SHOUT_FORMAT_OGG_AUDIO.
>
> This sounds like a better approach.  When you say it's not
> backward-compatible, do you reckon something would break?
>
> I hope libshout doesn't require rewriting some parts.

No, the API is 100% backward compatible. Only difference is that programs that
use the (deprecated) SHOUT_FORMAT_VORBIS will then send the "audio/ogg" mime
type instead of "application/ogg". I don't believe this will cause any
trouble.


Romain

_______________________________________________
Icecast-dev mailing list
Icecast-dev@...
http://lists.xiph.org/mailman/listinfo/icecast-dev

Re: [libshout] Add mime/content-type parameter

by Saoshyant :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 9/25/08, Romain Beauxis <toots@...> wrote:
> No, the API is 100% backward compatible. Only difference is that programs
> that use the (deprecated) SHOUT_FORMAT_VORBIS will then send the
> "audio/ogg" mime type instead of "application/ogg". I don't believe this will
> cause any trouble.

I'm sold.  If nobody sees a reason to oppose I'll be applying the patch*.

-Ivo

* as soon as I have some time.  New job's killing me.
_______________________________________________
Icecast-dev mailing list
Icecast-dev@...
http://lists.xiph.org/mailman/listinfo/icecast-dev

Re: [libshout] Add mime/content-type parameter

by Gilles PIETRI-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Le 26.09.2008 01:20, Ivo Emanuel Gonçalves a écrit :

> On 9/25/08, Romain Beauxis <toots@...> wrote:
>> No, the API is 100% backward compatible. Only difference is that programs
>> that use the (deprecated) SHOUT_FORMAT_VORBIS will then send the
>> "audio/ogg" mime type instead of "application/ogg". I don't believe this will
>> cause any trouble.
>
> I'm sold.  If nobody sees a reason to oppose I'll be applying the patch*.
>
> -Ivo
>
> * as soon as I have some time.  New job's killing me.

Hi,

Is that in the SVN already, or do we have to maintain a patched version
if we want to go forward on that? It's been around for some time, and I
think it would quite good to include it, unless there are reasons not to
that were not published on list?

Regards,

Gilou
_______________________________________________
Icecast-dev mailing list
Icecast-dev@...
http://lists.xiph.org/mailman/listinfo/icecast-dev

Re: [libshout] Add mime/content-type parameter

by Saoshyant :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 1/23/09, Gilles PIETRI <gilou@...> wrote:
> Is that in the SVN already

No, it's not.  I just hadn't had the time to finish some other Xiph
stuff that was in front of the queue, but if this i in high demand
I'll put it in front and do it during the weekend.

-Ivo
_______________________________________________
Icecast-dev mailing list
Icecast-dev@...
http://lists.xiph.org/mailman/listinfo/icecast-dev