+2004-05-25 Benjamin Otte <in7y118@public.uni-hamburg.de>
+
+ * gst/audioconvert/gstaudioconvert.c:
+ (gst_audio_convert_parse_caps):
+ make sure we don't allow depth > width
+ * gst/audioconvert/gstaudioconvert.c: (gst_audio_convert_fixate):
+ fixate endianness to G_BYTE_ORDER as default
+ * gst/audioscale/gstaudioscale.c:
+ we don't handle another endianness as host-endianness
+
2004-05-25 David Schleef <ds@schleef.org>
* gst/ffmpegcolorspace/mem.c: malloc() is in stdlib.h, not malloc.h
"rate = (int) [ 1, MAX ], " \
"channels = (int) [ 1, 2 ], " \
"endianness = (int) { LITTLE_ENDIAN, BIG_ENDIAN }, " \
- "width = (int) { 8, 16, 32 }, " \
+ "width = (int) 8, " \
+ "depth = (int) [ 1, 8 ], " \
+ "signed = (boolean) { true, false }; " \
+ "audio/x-raw-int, " \
+ "rate = (int) [ 1, MAX ], " \
+ "channels = (int) [ 1, 2 ], " \
+ "endianness = (int) { LITTLE_ENDIAN, BIG_ENDIAN }, " \
+ "width = (int) 16, " \
+ "depth = (int) [ 1, 16 ], " \
+ "signed = (boolean) { true, false }; " \
+ "audio/x-raw-int, " \
+ "rate = (int) [ 1, MAX ], " \
+ "channels = (int) [ 1, 2 ], " \
+ "endianness = (int) { LITTLE_ENDIAN, BIG_ENDIAN }, " \
+ "width = (int) 32, " \
"depth = (int) [ 1, 32 ], " \
"signed = (boolean) { true, false }; " \
"audio/x-raw-float, " \
GST_DEBUG ("could not get some values from structure");
return FALSE;
}
+ if (caps->is_int && caps->depth > caps->width) {
+ GST_DEBUG ("width > depth, not allowed - make us advertise correct caps");
+ return FALSE;
+ }
return TRUE;
}
return copy;
if (_fixate_caps_to_int (©, "depth", ac_caps.is_int ? ac_caps.depth : 16))
return copy;
+ if (_fixate_caps_to_int (©, "endianness",
+ ac_caps.is_int ? ac_caps.endianness : G_BYTE_ORDER))
+ return copy;
+
gst_caps_free (copy);
return NULL;
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS (GST_AUDIO_INT_PAD_TEMPLATE_CAPS)
+ GST_STATIC_CAPS ("audio/x-raw-int, "
+ "rate = (int) [ 1, MAX ], "
+ "channels = (int) [ 1, MAX ], "
+ "endianness = (int) BYTE_ORDER, "
+ "width = (int) { 8, 16, 24, 32 }, "
+ "depth = (int) [ 1, 32 ], " "signed = (boolean) { true, false }")
);
static GstStaticPadTemplate gst_audioscale_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS (GST_AUDIO_INT_PAD_TEMPLATE_CAPS)
+ GST_STATIC_CAPS ("audio/x-raw-int, "
+ "rate = (int) [ 1, MAX ], "
+ "channels = (int) [ 1, MAX ], "
+ "endianness = (int) BYTE_ORDER, "
+ "width = (int) { 8, 16, 24, 32 }, "
+ "depth = (int) [ 1, 32 ], " "signed = (boolean) { true, false }")
);
#define GST_TYPE_AUDIOSCALE_METHOD (gst_audioscale_method_get_type())