+2008-07-08 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+
+ * ext/raw1394/gstdv1394src.c: (gst_dv1394src_uri_set_uri):
+ * ext/speex/gstspeexenc.c: (gst_speex_enc_sink_getcaps):
+ * ext/wavpack/gstwavpackenc.c: (gst_wavpack_enc_set_wp_config):
+ * sys/v4l2/gstv4l2src.c: (gst_v4l2src_fixate):
+ * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_probe_caps_for_format):
+ * tests/examples/equalizer/demo.c: (message_handler):
+ * tests/examples/spectrum/demo-audiotest.c: (message_handler):
+ * tests/examples/spectrum/demo-osssrc.c: (message_handler):
+ Don't use declarations after statements and variable length arrays.
+
2008-07-07 Sebastian Dröge <sebastian.droege@collabora.co.uk>
Patch by: Daniel Drake <dsd at gentoo dot org>
-Subproject commit 593bb114c6f5c32b529aa6443be4c2d60d6484c7
+Subproject commit 79ade7b9c9bf47eee491ceee4cf3ea116140ad35
{
return GST_URI_SRC;
}
+
static gchar **
gst_dv1394src_uri_get_protocols (void)
{
return protocols;
}
+
static const gchar *
gst_dv1394src_uri_get_uri (GstURIHandler * handler)
{
gst_dv1394src_uri_set_uri (GstURIHandler * handler, const gchar * uri)
{
gchar *protocol, *location;
- gboolean ret;
-
- ret = TRUE;
-
+ gboolean ret = TRUE;
GstDV1394Src *gst_dv1394src = GST_DV1394SRC (handler);
protocol = gst_uri_get_protocol (uri);
if (peercaps) {
if (!gst_caps_is_empty (peercaps) && !gst_caps_is_any (peercaps)) {
GstStructure *ps = gst_caps_get_structure (peercaps, 0);
- GstStructure *s = gst_caps_get_structure (caps, 0);;
+ GstStructure *s = gst_caps_get_structure (caps, 0);
gint rate, channels;
if (gst_structure_get_int (ps, "rate", &rate)) {
/* Correction Mode, only in lossy mode */
if (enc->wp_config->flags & CONFIG_HYBRID_FLAG) {
if (enc->correction_mode > GST_WAVPACK_CORRECTION_MODE_OFF) {
+ GstCaps *caps = gst_caps_new_simple ("audio/x-wavpack-correction",
+ "framed", G_TYPE_BOOLEAN, TRUE, NULL);
+
enc->wvcsrcpad =
gst_pad_new_from_static_template (&wvcsrc_factory, "wvcsrc");
/* try to add correction src pad, don't set correction mode on failure */
- GstCaps *caps = gst_caps_new_simple ("audio/x-wavpack-correction",
- "framed", G_TYPE_BOOLEAN, TRUE, NULL);
-
GST_DEBUG_OBJECT (enc, "Adding correction pad with caps %"
GST_PTR_FORMAT, caps);
if (!gst_pad_set_caps (enc->wvcsrcpad, caps)) {
pad = (wid->correction) ? enc->wvcsrcpad : enc->srcpad;
flow =
- (wid->correction) ? &enc->wvcsrcpad_last_return : &enc->
- srcpad_last_return;
+ (wid->correction) ? &enc->
+ wvcsrcpad_last_return : &enc->srcpad_last_return;
*flow = gst_pad_alloc_buffer_and_set_caps (pad, GST_BUFFER_OFFSET_NONE,
count, GST_PAD_CAPS (pad), &buffer);
GST_DEBUG_OBJECT (basesrc, "fixating caps %" GST_PTR_FORMAT, caps);
for (i = 0; i < gst_caps_get_size (caps); ++i) {
- structure = gst_caps_get_structure (caps, i);
const GValue *v;
+ structure = gst_caps_get_structure (caps, i);
+
/* FIXME such sizes? we usually fixate to something in the 320x200
* range... */
/* We are fixating to greater possble size (limited to GST_V4L2_MAX_SIZE)
gst_v4l2src_probe_caps_for_format (GstV4l2Src * v4l2src, guint32 pixelformat,
const GstStructure * template)
{
- GstCaps *ret;
+ GstCaps *ret = gst_caps_new_empty ();
GstStructure *tmp;
- ret = gst_caps_new_empty ();
-
#ifdef VIDIOC_ENUM_FRAMESIZES
gint fd = v4l2src->v4l2object->video_fd;
struct v4l2_frmsizeenum size;
const gchar *name = gst_structure_get_name (s);
if (strcmp (name, "spectrum") == 0) {
- gfloat spect[spect_bands];
+ gfloat *spect = g_new (gfloat, spect_bands);
const GValue *list;
const GValue *value;
guint i;
spect[i] = height_scale * g_value_get_float (value);
}
draw_spectrum (spect);
+ g_free (spect);
}
}
return TRUE;
const gchar *name = gst_structure_get_name (s);
if (strcmp (name, "spectrum") == 0) {
- gfloat spect[spect_bands];
+ gfloat *spect = g_new (gfloat, spect_bands);
const GValue *list;
const GValue *value;
guint i;
spect[i] = height_scale * g_value_get_float (value);
}
draw_spectrum (spect);
+ g_free (spect);
}
}
return TRUE;
const gchar *name = gst_structure_get_name (s);
if (strcmp (name, "spectrum") == 0) {
- gfloat spect[spect_bands];
+ gfloat *spect = g_new (gfloat, spect_bands);
const GValue *list;
const GValue *value;
guint i;
spect[i] = height_scale * g_value_get_float (value);
}
draw_spectrum (spect);
+ g_free (spect);
}
}
return TRUE;