Commit b7cf10eb authored by Tim-Philipp Müller's avatar Tim-Philipp Müller
Browse files

gst/audioconvert/gstaudioconvert.c: We don't support floats with a width of 40, 48 or 56 bits.

Original commit message from CVS:
* gst/audioconvert/gstaudioconvert.c:
(set_structure_widths_32_and_64), (make_lossless_changes):
We don't support floats with a width of 40, 48 or 56 bits.
parent 36180a5f
2007-02-02 Tim-Philipp Müller <tim at centricular dot net>
* gst/audioconvert/gstaudioconvert.c:
(set_structure_widths_32_and_64), (make_lossless_changes):
We don't support floats with a width of 40, 48 or 56 bits.
2007-02-02 Stefan Kost <ensonic@users.sf.net>
* gst/audioconvert/audioconvert.c: (float), (double),
......@@ -345,6 +345,24 @@ set_structure_widths (GstStructure * s, int min, int max)
g_value_unset (&list);
}
/* Set widths of 32 bits and 64 bits (as list) */
static void
set_structure_widths_32_and_64 (GstStructure * s)
{
GValue list = { 0 };
GValue val = { 0 };
g_value_init (&list, GST_TYPE_LIST);
g_value_init (&val, G_TYPE_INT);
g_value_set_int (&val, 32);
gst_value_list_append_value (&list, &val);
g_value_set_int (&val, 64);
gst_value_list_append_value (&list, &val);
gst_structure_set_value (s, "width", &list);
g_value_unset (&val);
g_value_unset (&list);
}
/* Modify the structure so that things that must always have a single
* value (for float), or can always be losslessly converted (for int), have
* appropriate values.
......@@ -357,7 +375,7 @@ make_lossless_changes (GstStructure * s, gboolean isfloat)
* widths of 32/64 and native endianness */
gst_structure_remove_field (s, "depth");
gst_structure_remove_field (s, "signed");
set_structure_widths (s, 32, 64);
set_structure_widths_32_and_64 (s);
gst_structure_set (s, "endianness", G_TYPE_INT, G_BYTE_ORDER, NULL);
} else {
/* int supports either endian, and signed or unsigned. GValues are a pain */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment