ext/alsa/gstalsa.c: Don't fixate fields that aren't in the caps.
authorDavid Schleef <ds@schleef.org>
Tue, 30 Mar 2004 06:51:31 +0000 (06:51 +0000)
committerDavid Schleef <ds@schleef.org>
Tue, 30 Mar 2004 06:51:31 +0000 (06:51 +0000)
Original commit message from CVS:
* ext/alsa/gstalsa.c: (gst_alsa_fixate): Don't fixate fields that
aren't in the caps.
* gst/sine/gstsinesrc.c: change rate caps to [1,MAX]
* gst/videocrop/gstvideocrop.c: (plugin_init): Change rank to NONE.

ChangeLog
ext/alsa/gstalsa.c
gst/sine/gstsinesrc.c

index dc3240a..b58e948 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-03-29  David Schleef  <ds@schleef.org>
+
+       * ext/alsa/gstalsa.c: (gst_alsa_fixate): Don't fixate fields that
+       aren't in the caps.
+       * gst/sine/gstsinesrc.c: change rate caps to [1,MAX]
+       * gst/videocrop/gstvideocrop.c: (plugin_init): Change rank to NONE.
+
 2004-03-30  Benjamin Otte  <in7y118@public.uni-hamburg.de>
 
        * gst-libs/gst/riff/riff-media.c:
index 88b170f..5780a51 100644 (file)
@@ -781,15 +781,21 @@ gst_alsa_fixate (GstPad * pad, const GstCaps * caps)
   if (gst_caps_structure_fixate_field_nearest_int (structure, "rate", 44100)) {
     return newcaps;
   }
-  if (gst_caps_structure_fixate_field_nearest_int (structure, "depth", 16)) {
-    return newcaps;
-  }
-  if (gst_caps_structure_fixate_field_nearest_int (structure, "width", 16)) {
-    return newcaps;
-  }
   if (gst_caps_structure_fixate_field_nearest_int (structure, "channels", 2)) {
     return newcaps;
   }
+  if (strcmp (gst_structure_get_name (structure), "audio/x-raw-int") == 0) {
+    if (gst_caps_structure_fixate_field_nearest_int (structure, "depth", 16)) {
+      return newcaps;
+    }
+    if (gst_caps_structure_fixate_field_nearest_int (structure, "width", 16)) {
+      return newcaps;
+    }
+  } else {
+    if (gst_caps_structure_fixate_field_nearest_int (structure, "width", 32)) {
+      return newcaps;
+    }
+  }
 
   gst_caps_free (newcaps);
 
index 17ac7e1..668716c 100644 (file)
@@ -65,8 +65,7 @@ GST_STATIC_PAD_TEMPLATE ("src",
         "endianness = (int) BYTE_ORDER, "
         "signed = (boolean) true, "
         "width = (int) 16, "
-        "depth = (int) 16, "
-        "rate = (int) [ 8000, 48000 ], " "channels = (int) 1")
+        "depth = (int) 16, " "rate = (int) [ 1, MAX ], " "channels = (int) 1")
     );
 
 static void gst_sinesrc_class_init (GstSineSrcClass * klass);