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/playondemand/Makefile.am | 2 +- gst/playondemand/demo-mp3.c | 1 + gst/playondemand/gstplayondemand.c | 24 +++++++++++++----------- 3 files changed, 15 insertions(+), 12 deletions(-) (limited to 'gst/playondemand') 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 #include #include 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); -- cgit v1.2.1