gst-libs/gst/riff/: Add WMS caps.
authorWim Taymans <wim.taymans@gmail.com>
Tue, 10 Oct 2006 16:50:06 +0000 (16:50 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Tue, 10 Oct 2006 16:50:06 +0000 (16:50 +0000)
Original commit message from CVS:
* gst-libs/gst/riff/riff-ids.h:
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps),
(gst_riff_create_audio_template_caps):
Add WMS caps.

ChangeLog
gst-libs/gst/riff/riff-ids.h
gst-libs/gst/riff/riff-media.c

index deca9d2..3fdd96a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-10-10  Wim Taymans  <wim@fluendo.com>
+
+       * gst-libs/gst/riff/riff-ids.h:
+       * gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps),
+       (gst_riff_create_audio_template_caps):
+       Add WMS caps.
+
 2006-10-10  Zaheer Abbas Merali  <zaheerabbas at merali dot org>
 
        Patch by: Josep Torre Valles <josep@fluendo.com>
index babadb0..32ad8e0 100644 (file)
@@ -280,6 +280,7 @@ typedef struct _gst_riff_strf_auds {       /* == WaveHeader (?) */
 #define GST_RIFF_WAVE_FORMAT_IBM_CVSD       (0x0005)
 #define GST_RIFF_WAVE_FORMAT_ALAW           (0x0006)
 #define GST_RIFF_WAVE_FORMAT_MULAW          (0x0007)
+#define GST_RIFF_WAVE_FORMAT_WMS            (0x000a) /* WMS Windows Media Audio Speech */
 #define GST_RIFF_WAVE_FORMAT_OKI_ADPCM      (0x0010)
 #define GST_RIFF_WAVE_FORMAT_DVI_ADPCM      (0x0011)
 #define GST_RIFF_WAVE_FORMAT_DIGISTD        (0x0015)
index f7145ef..708ad80 100644 (file)
@@ -805,6 +805,22 @@ gst_riff_create_audio_caps (guint16 codec_id,
         *codec_name = g_strdup ("A-law audio");
       break;
 
+    case GST_RIFF_WAVE_FORMAT_WMS:
+      caps = gst_caps_new_simple ("audio/x-wms", NULL);
+      if (strf != NULL) {
+        gst_caps_set_simple (caps,
+            "bitrate", G_TYPE_INT, strf->av_bps * 8,
+            "width", G_TYPE_INT, strf->size,
+            "depth", G_TYPE_INT, strf->size, NULL);
+      } else {
+        gst_caps_set_simple (caps,
+            "bitrate", GST_TYPE_INT_RANGE, 0, G_MAXINT, NULL);
+      }
+      if (codec_name)
+        *codec_name = g_strdup ("Windows Media Audio Speech");
+      block_align = TRUE;
+      break;
+
     case GST_RIFF_WAVE_FORMAT_MULAW:
       if (strf != NULL) {
         if (strf->size != 8) {
@@ -1173,6 +1189,7 @@ gst_riff_create_audio_template_caps (void)
     GST_RIFF_WAVE_FORMAT_AAC,
     GST_RIFF_WAVE_FORMAT_ALAW,
     GST_RIFF_WAVE_FORMAT_MULAW,
+    GST_RIFF_WAVE_FORMAT_WMS,
     GST_RIFF_WAVE_FORMAT_ADPCM,
     GST_RIFF_WAVE_FORMAT_DVI_ADPCM,
     GST_RIFF_WAVE_FORMAT_WMAV1,