From 444336ab9055ff036ae8ba5ba25591174d3b87de Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sat, 30 Mar 2002 17:06:26 +0000 Subject: Changed to the new props API Original commit message from CVS: Changed to the new props API Other small tuff. --- gst/passthrough/gstpassthrough.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'gst/passthrough/gstpassthrough.c') diff --git a/gst/passthrough/gstpassthrough.c b/gst/passthrough/gstpassthrough.c index caa25598..e7f6c1d2 100644 --- a/gst/passthrough/gstpassthrough.c +++ b/gst/passthrough/gstpassthrough.c @@ -120,18 +120,19 @@ passthrough_connect_sink (GstPad *pad, GstCaps *caps) g_return_val_if_fail (filter != NULL, GST_PAD_CONNECT_REFUSED); g_return_val_if_fail (GST_IS_PASSTHROUGH (filter), GST_PAD_CONNECT_REFUSED); - format = gst_caps_get_string(caps, "format"); + gst_caps_get_string(caps, "format", &format); - filter->rate = gst_caps_get_int (caps, "rate"); - filter->channels = gst_caps_get_int (caps, "channels"); + gst_caps_get_int (caps, "rate", &filter->rate); + gst_caps_get_int (caps, "channels", &filter->channels); if (strcmp (format, "int") == 0) { filter->format = GST_PASSTHROUGH_FORMAT_INT; - filter->width = gst_caps_get_int (caps, "width"); - filter->depth = gst_caps_get_int (caps, "depth"); - filter->law = gst_caps_get_int (caps, "law"); - filter->endianness = gst_caps_get_int (caps, "endianness"); - filter->is_signed = gst_caps_get_int (caps, "signed"); + gst_caps_get_int (caps, "width", &filter->width); + gst_caps_get_int (caps, "depth", &filter->depth); + gst_caps_get_int (caps, "law", &filter->law); + gst_caps_get_int (caps, "endianness", &filter->endianness); + gst_caps_get_int (caps, "signed", &filter->is_signed); + if (! filter->silent) { g_print ("Passthrough : channels %d, rate %d\n", filter->channels, filter->rate); @@ -140,9 +141,10 @@ passthrough_connect_sink (GstPad *pad, GstCaps *caps) } } else if (strcmp (format, "float") == 0) { filter->format = GST_PASSTHROUGH_FORMAT_FLOAT; - filter->layout = gst_caps_get_string (caps, "layout"); - filter->intercept = gst_caps_get_float (caps, "intercept"); - filter->slope = gst_caps_get_float (caps, "slope"); + gst_caps_get_string (caps, "layout", &filter->layout); + gst_caps_get_float (caps, "intercept", &filter->intercept); + gst_caps_get_float (caps, "slope", &filter->slope); + if (! filter->silent) { g_print ("Passthrough : channels %d, rate %d\n", filter->channels, filter->rate); -- cgit v1.2.1