summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2002-03-30 17:06:26 +0000
committerWim Taymans <wim.taymans@gmail.com>2002-03-30 17:06:26 +0000
commit444336ab9055ff036ae8ba5ba25591174d3b87de (patch)
tree3b70ea62c77db652f7545c1c2f85852c2005bd14 /gst
parent2641c8c05fc04a14c82a4f9a91927e4002342ddb (diff)
downloadgst-plugins-bad-444336ab9055ff036ae8ba5ba25591174d3b87de.tar.gz
gst-plugins-bad-444336ab9055ff036ae8ba5ba25591174d3b87de.tar.bz2
gst-plugins-bad-444336ab9055ff036ae8ba5ba25591174d3b87de.zip
Changed to the new props API
Original commit message from CVS: Changed to the new props API Other small tuff.
Diffstat (limited to 'gst')
-rw-r--r--gst/chart/gstchart.c2
-rw-r--r--gst/deinterlace/gstdeinterlace.c4
-rw-r--r--gst/passthrough/gstpassthrough.c24
-rw-r--r--gst/playondemand/Makefile.am2
-rw-r--r--gst/playondemand/demo-mp3.c1
-rw-r--r--gst/playondemand/gstplayondemand.c24
-rw-r--r--gst/smooth/gstsmooth.c4
-rw-r--r--gst/speed/Makefile.am2
-rw-r--r--gst/speed/gstspeed.c24
-rw-r--r--gst/y4m/gsty4mencode.c4
10 files changed, 49 insertions, 42 deletions
diff --git a/gst/chart/gstchart.c b/gst/chart/gstchart.c
index 2d362d73..f049c194 100644
--- a/gst/chart/gstchart.c
+++ b/gst/chart/gstchart.c
@@ -236,7 +236,7 @@ gst_chart_sinkconnect (GstPad *pad, GstCaps *caps)
GstChart *chart;
chart = GST_CHART (gst_pad_get_parent (pad));
- chart->samplerate = gst_caps_get_int (caps, "rate");
+ gst_caps_get_int (caps, "rate", &chart->samplerate);
chart->samples_between_frames = chart->samplerate / chart->framerate;
GST_DEBUG (0, "CHART: new sink caps: rate %d",
diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c
index 83ed0995..ab716f35 100644
--- a/gst/deinterlace/gstdeinterlace.c
+++ b/gst/deinterlace/gstdeinterlace.c
@@ -146,8 +146,8 @@ gst_deinterlace_sinkconnect (GstPad *pad, GstCaps *caps)
if (!GST_CAPS_IS_FIXED (caps))
return GST_PAD_CONNECT_DELAYED;
- filter->width = gst_caps_get_int (caps, "width");
- filter->height = gst_caps_get_int (caps, "height");
+ gst_caps_get_int (caps, "width", &filter->width);
+ gst_caps_get_int (caps, "height", &filter->height);
if (filter->picsize != (filter->width*filter->height)) {
if (filter->src)
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);
diff --git a/gst/playondemand/Makefile.am b/gst/playondemand/Makefile.am
index 906c56fe..63052ac1 100644
--- a/gst/playondemand/Makefile.am
+++ b/gst/playondemand/Makefile.am
@@ -10,7 +10,7 @@ libgstplayondemand_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstplayondemand.h filter.func
if HAVE_GTK
-noinst_PROGRAMS = demo-mp3
+noinst_PROGRAMS = demo_mp3
endif
demo_mp3_SOURCES = demo-mp3.c
diff --git a/gst/playondemand/demo-mp3.c b/gst/playondemand/demo-mp3.c
index 8296fd00..f2cab728 100644
--- a/gst/playondemand/demo-mp3.c
+++ b/gst/playondemand/demo-mp3.c
@@ -1,3 +1,4 @@
+#include <glib.h>
#include <gtk/gtk.h>
#include <gst/gst.h>
diff --git a/gst/playondemand/gstplayondemand.c b/gst/playondemand/gstplayondemand.c
index 103e998c..ab236c46 100644
--- a/gst/playondemand/gstplayondemand.c
+++ b/gst/playondemand/gstplayondemand.c
@@ -129,18 +129,19 @@ play_on_demand_pad_connect (GstPad *pad, GstCaps *caps)
filter = GST_PLAYONDEMAND(GST_PAD_PARENT(pad));
- 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_PLAYONDEMAND_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_boolean (caps, "signed", &filter->is_signed);
+
if (!filter->silent) {
g_print ("PlayOnDemand : channels %d, rate %d\n",
filter->channels, filter->rate);
@@ -149,9 +150,10 @@ play_on_demand_pad_connect (GstPad *pad, GstCaps *caps)
}
} else if (strcmp(format, "float") == 0) {
filter->format = GST_PLAYONDEMAND_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 ("PlayOnDemand : channels %d, rate %d\n",
filter->channels, filter->rate);
diff --git a/gst/smooth/gstsmooth.c b/gst/smooth/gstsmooth.c
index 7dc5c7e3..9741b5b6 100644
--- a/gst/smooth/gstsmooth.c
+++ b/gst/smooth/gstsmooth.c
@@ -137,8 +137,8 @@ gst_smooth_sinkconnect (GstPad *pad, GstCaps *caps)
if (!GST_CAPS_IS_FIXED (caps))
return GST_PAD_CONNECT_DELAYED;
- filter->width = gst_caps_get_int (caps, "width");
- filter->height = gst_caps_get_int (caps, "height");
+ gst_caps_get_int (caps, "width", &filter->width);
+ gst_caps_get_int (caps, "height", &filter->height);
return GST_PAD_CONNECT_OK;
}
diff --git a/gst/speed/Makefile.am b/gst/speed/Makefile.am
index 7ab9f2cb..6a75868f 100644
--- a/gst/speed/Makefile.am
+++ b/gst/speed/Makefile.am
@@ -10,7 +10,7 @@ libgstspeed_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstspeed.h filter.func
if HAVE_GTK
-noinst_PROGRAMS = demo-mp3
+noinst_PROGRAMS = demo_mp3
endif
demo_mp3_SOURCES = demo-mp3.c
diff --git a/gst/speed/gstspeed.c b/gst/speed/gstspeed.c
index d76d814b..b5a03c01 100644
--- a/gst/speed/gstspeed.c
+++ b/gst/speed/gstspeed.c
@@ -138,18 +138,19 @@ speed_parse_caps (GstSpeed *filter, GstCaps *caps)
g_return_val_if_fail(filter!=NULL,-1);
g_return_val_if_fail(caps!=NULL,-1);
- 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_SPEED_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 ("Speed : channels %d, rate %d\n",
filter->channels, filter->rate);
@@ -158,9 +159,10 @@ speed_parse_caps (GstSpeed *filter, GstCaps *caps)
}
} else if (strcmp(format, "float")==0) {
filter->format = GST_SPEED_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 ("Speed : channels %d, rate %d\n",
filter->channels, filter->rate);
diff --git a/gst/y4m/gsty4mencode.c b/gst/y4m/gsty4mencode.c
index 900888f9..9e99dc5e 100644
--- a/gst/y4m/gsty4mencode.c
+++ b/gst/y4m/gsty4mencode.c
@@ -125,8 +125,8 @@ gst_lavencode_sinkconnect (GstPad *pad, GstCaps *caps)
if (!GST_CAPS_IS_FIXED (caps))
return GST_PAD_CONNECT_DELAYED;
- filter->width = gst_caps_get_int (caps, "width");
- filter->height = gst_caps_get_int (caps, "height");
+ gst_caps_get_int (caps, "width", &filter->width);
+ gst_caps_get_int (caps, "height", &filter->height);
return GST_PAD_CONNECT_OK;
}