2006-09-17 Stefan Kost <ensonic@users.sf.net>
+ * gst/audioconvert/gstaudioconvert.c: (set_structure_widths),
+ (gst_audio_convert_transform_caps):
+ Get structure-name just once.
+
+2006-09-17 Stefan Kost <ensonic@users.sf.net>
+
* tests/check/elements/audioresample.c: (GST_START_TEST):
* tests/check/elements/videotestsrc.c: (check_rgb_buf):
* tests/check/elements/volume.c: (GST_START_TEST):
for (width = min; width <= max; width += 8) {
g_value_set_int (&val, width);
gst_value_list_append_value (&list, &val);
- GST_LOG ("Appended width %d to widths available", width);
}
gst_structure_set_value (s, "width", &list);
g_value_unset (&val);
GstStructure *s, *structure;
gboolean isfloat;
gint width, depth, channels;
- gchar *fields_used[] = { "width", "depth", "rate", "channels", "endianness",
- "signed"
+ gchar *fields_used[] = {
+ "width", "depth", "rate", "channels", "endianness", "signed"
};
+ const gchar *structure_name;
int i;
g_return_val_if_fail (GST_CAPS_IS_SIMPLE (caps), NULL);
structure = gst_caps_get_structure (caps, 0);
+ structure_name = gst_structure_get_name (structure);
- isfloat = strcmp (gst_structure_get_name (structure),
- "audio/x-raw-float") == 0;
+ isfloat = strcmp (structure_name, "audio/x-raw-float") == 0;
/* We operate on a version of the original structure with any additional
* fields absent */
- s = gst_structure_empty_new (gst_structure_get_name (structure));
+ s = gst_structure_empty_new (structure_name);
for (i = 0; i < sizeof (fields_used) / sizeof (*fields_used); i++) {
if (gst_structure_has_field (structure, fields_used[i]))
gst_structure_set_value (s, fields_used[i],
/* Same, plus a float<->int conversion */
append_with_other_format (ret, s, isfloat);
+ GST_DEBUG_OBJECT (base, " step1: (%d) %" GST_PTR_FORMAT,
+ gst_caps_get_size (ret), ret);
/* We don't mind increasing width/depth/channels, but reducing them is
* Very Bad. Only available if width, depth, channels are already fixed. */