summaryrefslogtreecommitdiffstats
path: root/gst/filter
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2002-09-10 09:31:40 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2002-09-10 09:31:40 +0000
commit2c5496eb74498afc6ff26e47773af43239a07abd (patch)
treed246cf3070c309a87325709fd05169b553b0024e /gst/filter
parentaf558bdc6f39c680689423d98d2b60e7fd7a4c81 (diff)
downloadgst-plugins-bad-2c5496eb74498afc6ff26e47773af43239a07abd.tar.gz
gst-plugins-bad-2c5496eb74498afc6ff26e47773af43239a07abd.tar.bz2
gst-plugins-bad-2c5496eb74498afc6ff26e47773af43239a07abd.zip
This updates all plugins to the new API for gst_pad_try_set_caps
Original commit message from CVS: This updates all plugins to the new API for gst_pad_try_set_caps
Diffstat (limited to 'gst/filter')
-rw-r--r--gst/filter/gstbpwsinc.c11
-rw-r--r--gst/filter/gstiir.c9
-rw-r--r--gst/filter/gstlpwsinc.c11
3 files changed, 17 insertions, 14 deletions
diff --git a/gst/filter/gstbpwsinc.c b/gst/filter/gstbpwsinc.c
index 916fcbe9..6ce634d3 100644
--- a/gst/filter/gstbpwsinc.c
+++ b/gst/filter/gstbpwsinc.c
@@ -179,6 +179,7 @@ gst_bpwsinc_sink_connect (GstPad * pad, GstCaps * caps)
double sum = 0.0;
int len = 0;
double *kernel_lp, *kernel_hp;
+ GstPadConnectReturn set_retval;
GstBPWSinc *filter = GST_BPWSINC (gst_pad_get_parent (pad));
@@ -187,8 +188,10 @@ gst_bpwsinc_sink_connect (GstPad * pad, GstCaps * caps)
if (!GST_CAPS_IS_FIXED (caps))
return GST_PAD_CONNECT_DELAYED;
-
- if (gst_pad_try_set_caps (filter->srcpad, caps))
+
+ set_retval = gst_pad_try_set_caps (filter->srcpad, caps);
+
+ if (set_retval > 0)
{
len = filter->wing_size;
/* fill the lp kernel */
@@ -259,11 +262,9 @@ gst_bpwsinc_sink_connect (GstPad * pad, GstCaps * caps)
/* set up the residue memory space */
filter->residue = (gfloat *) g_malloc (sizeof (gfloat) * (len * 2 + 1));
for (i = 0; i <= len * 2; ++i) filter->residue[i] = 0.0;
-
- return GST_PAD_CONNECT_OK;
}
- return GST_PAD_CONNECT_REFUSED;
+ return set_retval;
}
static void
diff --git a/gst/filter/gstiir.c b/gst/filter/gstiir.c
index c363802c..7b548f30 100644
--- a/gst/filter/gstiir.c
+++ b/gst/filter/gstiir.c
@@ -164,22 +164,23 @@ static GstPadConnectReturn
gst_iir_sink_connect (GstPad * pad, GstCaps * caps)
{
GstIIR *filter;
+ GstPadConnectReturn set_retval;
filter = GST_IIR (gst_pad_get_parent (pad));
if (!GST_CAPS_IS_FIXED (caps))
return GST_PAD_CONNECT_DELAYED;
-
- if (gst_pad_try_set_caps (filter->srcpad, caps)) {
+
+ set_retval = gst_pad_try_set_caps(filter->srcpad, caps);
+ if (set_retval > 0) {
/* connection works, so init the filter */
/* FIXME: remember to free it */
filter->state = (IIR_state *) g_malloc (sizeof (IIR_state));
IIR_init (filter->state, filter->stages,
filter->gain, &(filter->A), &(filter->B));
- return GST_PAD_CONNECT_OK;
}
- return GST_PAD_CONNECT_REFUSED;
+ return set_retval;
}
static void
diff --git a/gst/filter/gstlpwsinc.c b/gst/filter/gstlpwsinc.c
index fc916a82..664df870 100644
--- a/gst/filter/gstlpwsinc.c
+++ b/gst/filter/gstlpwsinc.c
@@ -171,14 +171,17 @@ gst_lpwsinc_sink_connect (GstPad * pad, GstCaps * caps)
double sum = 0.0;
int len = 0;
GstLPWSinc *filter = GST_LPWSINC (gst_pad_get_parent (pad));
+ GstPadConnectReturn set_retval;
g_assert (GST_IS_PAD (pad));
g_assert (caps != NULL);
if (!GST_CAPS_IS_FIXED (caps))
return GST_PAD_CONNECT_DELAYED;
-
- if (gst_pad_try_set_caps (filter->srcpad, caps))
+
+ set_retval = gst_pad_try_set_caps(filter->srcpad, caps);
+
+ if (set_retval > 0)
{
/* connection works, so init the filter */
/* FIXME: remember to free it */
@@ -208,11 +211,9 @@ gst_lpwsinc_sink_connect (GstPad * pad, GstCaps * caps)
/* set up the residue memory space */
filter->residue = (gfloat *) g_malloc (sizeof (gfloat) * (len * 2 + 1));
for (i = 0; i <= len * 2; ++i) filter->residue[i] = 0.0;
-
- return GST_PAD_CONNECT_OK;
}
- return GST_PAD_CONNECT_REFUSED;
+ return set_retval;
}
static void