summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac9
-rw-r--r--ext/audiofile/gstafsink.c10
-rw-r--r--ext/gsm/gstgsmdec.c5
-rw-r--r--ext/gsm/gstgsmenc.c2
-rw-r--r--ext/hermes/gstcolorspace.c39
-rw-r--r--ext/hermes/yuv2rgb.c30
-rw-r--r--ext/ladspa/gstladspa.c22
-rw-r--r--ext/sdl/sdlvideosink.c13
-rw-r--r--ext/tarkin/gsttarkinenc.c4
-rw-r--r--ext/tarkin/tarkin.c2
-rw-r--r--gst-libs/gst/audio/audio.c25
-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
21 files changed, 146 insertions, 106 deletions
diff --git a/configure.ac b/configure.ac
index f22e5849..339a53d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -433,6 +433,14 @@ GST_CHECK_FEATURE(HTTP, [http plugins], gsthttpsrc, [
])
dnl *** Jack ***
+translit(dnm, m, l) AM_CONDITIONAL(USE_LCS, true)
+GST_CHECK_FEATURE(LCS, Lcs, lcs, [
+ PKG_CHECK_MODULES(LCS, lcs, HAVE_LCS="yes", HAVE_LCS="no")
+ AC_SUBST(LCS_CFLAGS)
+ AC_SUBST(LCS_LIBS)
+])
+
+dnl *** Jack ***
translit(dnm, m, l) AM_CONDITIONAL(USE_JACK, true)
GST_CHECK_FEATURE(JACK, Jack, jack, [
PKG_CHECK_MODULES(JACK, jack, HAVE_JACK="yes", HAVE_JACK="no")
@@ -796,6 +804,7 @@ ext/hermes/Makefile
ext/http/Makefile
ext/jack/Makefile
ext/jpeg/Makefile
+ext/lcs/Makefile
ext/ladspa/Makefile
ext/lame/Makefile
ext/mad/Makefile
diff --git a/ext/audiofile/gstafsink.c b/ext/audiofile/gstafsink.c
index 7a3fa571..0a32c178 100644
--- a/ext/audiofile/gstafsink.c
+++ b/ext/audiofile/gstafsink.c
@@ -311,11 +311,11 @@ gst_afsink_open_file (GstAFSink *sink)
}
else
{
- sink->channels = gst_caps_get_int (caps, "channels");
- sink->width = gst_caps_get_int (caps, "width");
- sink->rate = gst_caps_get_int (caps, "rate");
- sink->is_signed = gst_caps_get_int (caps, "signed");
- sink->endianness_data = gst_caps_get_int (caps, "endianness");
+ gst_caps_get_int (caps, "channels", &sink->channels);
+ gst_caps_get_int (caps, "width", &sink->width);
+ gst_caps_get_int (caps, "rate", &sink->rate);
+ gst_caps_get_int (caps, "signed", &sink->is_signed);
+ gst_caps_get_int (caps, "endianness", &sink->endianness_data);
}
GST_DEBUG (GST_CAT_PLUGIN_INFO, "channels %d, width %d, rate %d, signed %s",
sink->channels, sink->width, sink->rate,
diff --git a/ext/gsm/gstgsmdec.c b/ext/gsm/gstgsmdec.c
index 1da43975..0e2f4168 100644
--- a/ext/gsm/gstgsmdec.c
+++ b/ext/gsm/gstgsmdec.c
@@ -106,12 +106,15 @@ static GstPadConnectReturn
gst_gsmdec_sinkconnect (GstPad *pad, GstCaps *caps)
{
GstGSMDec *gsmdec;
+ gint rate;
gsmdec = GST_GSMDEC (gst_pad_get_parent (pad));
if (!GST_CAPS_IS_FIXED (caps))
return GST_PAD_CONNECT_DELAYED;
+ gst_caps_get_int (caps, "rate", &rate);
+
if (gst_pad_try_set_caps (gsmdec->srcpad,
GST_CAPS_NEW (
"gsm_raw",
@@ -122,7 +125,7 @@ gst_gsmdec_sinkconnect (GstPad *pad, GstCaps *caps)
"signed", GST_PROPS_BOOLEAN (TRUE),
"width", GST_PROPS_INT (16),
"depth", GST_PROPS_INT (16),
- "rate", GST_PROPS_INT (gst_caps_get_int (caps, "rate")),
+ "rate", GST_PROPS_INT (rate),
"channels", GST_PROPS_INT (1)
)))
{
diff --git a/ext/gsm/gstgsmenc.c b/ext/gsm/gstgsmenc.c
index bd930dc7..e9a61cde 100644
--- a/ext/gsm/gstgsmenc.c
+++ b/ext/gsm/gstgsmenc.c
@@ -123,7 +123,7 @@ gst_gsmenc_sinkconnect (GstPad *pad, GstCaps *caps)
if (!GST_CAPS_IS_FIXED (caps))
return GST_PAD_CONNECT_DELAYED;
- gsmenc->rate = gst_caps_get_int (caps, "rate");
+ gst_caps_get_int (caps, "rate", &gsmenc->rate);
if (gst_pad_try_set_caps (gsmenc->srcpad, GST_CAPS_NEW (
"gsm_gsm",
"audio/x-gsm",
diff --git a/ext/hermes/gstcolorspace.c b/ext/hermes/gstcolorspace.c
index 15472cd3..fcd76148 100644
--- a/ext/hermes/gstcolorspace.c
+++ b/ext/hermes/gstcolorspace.c
@@ -124,28 +124,34 @@ colorspace_get_bufferpool (GstPad *pad)
static gboolean
colorspace_setup_converter (GstColorspace *space, GstCaps *from_caps, GstCaps *to_caps)
{
- gulong from_space, to_space;
+ guint32 from_space, to_space;
g_return_val_if_fail (to_caps != NULL, FALSE);
g_return_val_if_fail (from_caps != NULL, FALSE);
- from_space = gst_caps_get_fourcc_int (from_caps, "format");
- to_space = gst_caps_get_fourcc_int (to_caps, "format");
+ gst_caps_get_fourcc_int (from_caps, "format", &from_space);
+ gst_caps_get_fourcc_int (to_caps, "format", &to_space);
- GST_INFO (GST_CAT_NEGOTIATION, "set up converter for %08lx to %08lx", from_space, to_space);
+ GST_INFO (GST_CAT_NEGOTIATION, "set up converter for %08x to %08x", from_space, to_space);
switch (from_space) {
case GST_MAKE_FOURCC ('R','G','B',' '):
{
- gint from_bpp = gst_caps_get_int (from_caps, "bpp");
+ gint from_bpp;
+
+ gst_caps_get_int (from_caps, "bpp", &from_bpp);
switch (to_space) {
case GST_MAKE_FOURCC ('R','G','B',' '):
#ifdef HAVE_HERMES
{
- space->source.r = gst_caps_get_int (from_caps, "red_mask");
- space->source.g = gst_caps_get_int (from_caps, "green_mask");
- space->source.b = gst_caps_get_int (from_caps, "blue_mask");
+ gint to_bpp;
+
+ gst_caps_get_int (to_caps, "bpp", &to_bpp);
+
+ gst_caps_get_int (from_caps, "red_mask", &space->source.r);
+ gst_caps_get_int (from_caps, "green_mask", &space->source.g);
+ gst_caps_get_int (from_caps, "blue_mask", &space->source.b);
space->source.a = 0;
space->srcbpp = space->source.bits = from_bpp;
space->source.indexed = 0;
@@ -156,11 +162,11 @@ colorspace_setup_converter (GstColorspace *space, GstCaps *from_caps, GstCaps *t
GST_INFO (GST_CAT_PLUGIN_INFO, "source blue mask %08x", space->source.b);
GST_INFO (GST_CAT_PLUGIN_INFO, "source bpp %08x", space->srcbpp);
- space->dest.r = gst_caps_get_int (to_caps, "red_mask");
- space->dest.g = gst_caps_get_int (to_caps, "green_mask");
- space->dest.b = gst_caps_get_int (to_caps, "blue_mask");
+ gst_caps_get_int (to_caps, "red_mask", &space->dest.r);
+ gst_caps_get_int (to_caps, "green_mask", &space->dest.g);
+ gst_caps_get_int (to_caps, "blue_mask", &space->dest.b);
space->dest.a = 0;
- space->destbpp = space->dest.bits = gst_caps_get_int (to_caps, "bpp");
+ space->destbpp = space->dest.bits = to_bpp;
space->dest.indexed = 0;
space->dest.has_colorkey = 0;
@@ -204,7 +210,7 @@ colorspace_setup_converter (GstColorspace *space, GstCaps *from_caps, GstCaps *t
case GST_MAKE_FOURCC ('R','G','B',' '):
GST_INFO (GST_CAT_NEGOTIATION, "colorspace: YUV to RGB");
- space->destbpp = gst_caps_get_int (to_caps, "bpp");
+ gst_caps_get_int (to_caps, "bpp", &space->destbpp);
space->converter = gst_colorspace_yuv2rgb_get_converter (from_caps, to_caps);
space->type = GST_COLORSPACE_YUV_RGB;
return TRUE;
@@ -264,8 +270,8 @@ gst_colorspace_sinkconnect (GstPad *pad, GstCaps *caps)
return GST_PAD_CONNECT_DELAYED;
}
- space->width = gst_caps_get_int (caps, "width");
- space->height = gst_caps_get_int (caps, "height");
+ gst_caps_get_int (caps, "width", &space->width);
+ gst_caps_get_int (caps, "height", &space->height);
GST_INFO (GST_CAT_PROPERTIES, "size: %dx%d", space->width, space->height);
@@ -355,7 +361,8 @@ gst_colorspace_get_type (void)
if (!colorspace_type) {
static const GTypeInfo colorspace_info = {
- sizeof(GstColorspaceClass), NULL,
+ sizeof(GstColorspaceClass),
+ NULL,
NULL,
(GClassInitFunc)gst_colorspace_class_init,
NULL,
diff --git a/ext/hermes/yuv2rgb.c b/ext/hermes/yuv2rgb.c
index 24afe9ac..b1fb0008 100644
--- a/ext/hermes/yuv2rgb.c
+++ b/ext/hermes/yuv2rgb.c
@@ -100,7 +100,7 @@ static GstColorSpaceYUVTables * gst_colorspace_init_yuv(long depth,
GstColorSpaceConverter*
gst_colorspace_yuv2rgb_get_converter (GstCaps *from, GstCaps *to)
{
- gulong from_space, to_space;
+ guint32 from_space, to_space;
GstColorSpaceConverter *new;
gint to_bpp;
@@ -108,13 +108,13 @@ gst_colorspace_yuv2rgb_get_converter (GstCaps *from, GstCaps *to)
new = g_malloc (sizeof (GstColorSpaceConverter));
- new->width = gst_caps_get_int (from, "width");
- new->height = gst_caps_get_int (from, "height");
+ gst_caps_get_int (from, "width", &new->width);
+ gst_caps_get_int (from, "height", &new->height);
new->color_tables = NULL;
- from_space = gst_caps_get_fourcc_int (from, "format");
- to_space = gst_caps_get_fourcc_int (to, "format");
- to_bpp = gst_caps_get_int (to, "bpp");
+ gst_caps_get_fourcc_int (from, "format", &from_space);
+ gst_caps_get_fourcc_int (to, "format", &to_space);
+ gst_caps_get_int (to, "bpp", &to_bpp);
/* FIXME we leak new here. */
g_return_val_if_fail (to_space == GST_STR_FOURCC ("RGB "), NULL);
@@ -122,17 +122,17 @@ gst_colorspace_yuv2rgb_get_converter (GstCaps *from, GstCaps *to)
switch(from_space) {
case GST_MAKE_FOURCC ('I','4','2','0'):
{
- gulong red_mask;
- gulong green_mask;
- gulong blue_mask;
+ gint red_mask;
+ gint green_mask;
+ gint blue_mask;
- red_mask = gst_caps_get_int (to, "red_mask");
- green_mask = gst_caps_get_int (to, "green_mask");
- blue_mask = gst_caps_get_int (to, "blue_mask");
+ gst_caps_get_int (to, "red_mask", &red_mask);
+ gst_caps_get_int (to, "green_mask", &green_mask);
+ gst_caps_get_int (to, "blue_mask", &blue_mask);
- GST_INFO (GST_CAT_PLUGIN_INFO, "red_mask %08lx", red_mask);
- GST_INFO (GST_CAT_PLUGIN_INFO, "green_mask %08lx", green_mask);
- GST_INFO (GST_CAT_PLUGIN_INFO, "blue_mask %08lx", blue_mask);
+ GST_INFO (GST_CAT_PLUGIN_INFO, "red_mask %08x", red_mask);
+ GST_INFO (GST_CAT_PLUGIN_INFO, "green_mask %08x", green_mask);
+ GST_INFO (GST_CAT_PLUGIN_INFO, "blue_mask %08x", blue_mask);
new->insize = new->width * new->height + new->width * new->height/2;
new->color_tables = gst_colorspace_init_yuv (to_bpp, red_mask, green_mask, blue_mask);
diff --git a/ext/ladspa/gstladspa.c b/ext/ladspa/gstladspa.c
index 69eeed53..bb49547b 100644
--- a/ext/ladspa/gstladspa.c
+++ b/ext/ladspa/gstladspa.c
@@ -109,7 +109,7 @@ gst_ladspa_get_bufferpool (GstPad *pad)
{
gint i;
GstBufferPool *bp;
- GstLADSPA *ladspa = gst_pad_get_parent (pad);
+ GstLADSPA *ladspa = (GstLADSPA *) gst_pad_get_parent (pad);
GstLADSPAClass *oclass = (GstLADSPAClass *) (G_OBJECT_GET_CLASS (ladspa));
if (oclass->numsrcpads > 0)
@@ -394,7 +394,7 @@ gst_ladspa_init (GstLADSPA *ladspa)
}
ladspa->loopbased = TRUE;
- gst_element_set_loop_function (ladspa, gst_ladspa_loop);
+ gst_element_set_loop_function (GST_ELEMENT (ladspa), gst_ladspa_loop);
}
gst_ladspa_instantiate(ladspa);
@@ -406,13 +406,15 @@ gst_ladspa_connect (GstPad *pad, GstCaps *caps)
GstLADSPA *ladspa = (GstLADSPA *) GST_PAD_PARENT (pad);
GstLADSPAClass *oclass = (GstLADSPAClass *) (G_OBJECT_GET_CLASS (ladspa));
guint i;
+ gint rate;
g_return_val_if_fail (caps != NULL, GST_PAD_CONNECT_DELAYED);
g_return_val_if_fail (pad != NULL, GST_PAD_CONNECT_DELAYED);
+ gst_caps_get_int (caps, "rate", &rate);
/* have to instantiate ladspa plugin when samplerate changes (groan) */
- if (ladspa->samplerate != gst_caps_get_int (caps, "rate")){
- ladspa->samplerate = gst_caps_get_int (caps, "rate");
+ if (ladspa->samplerate != rate){
+ ladspa->samplerate = rate;
if (! gst_ladspa_instantiate(ladspa))
return GST_PAD_CONNECT_REFUSED;
}
@@ -434,12 +436,15 @@ static GstPadConnectReturn
gst_ladspa_connect_get (GstPad *pad, GstCaps *caps)
{
GstLADSPA *ladspa = (GstLADSPA*)GST_OBJECT_PARENT (pad);
+ gint rate;
g_return_val_if_fail (caps != NULL, GST_PAD_CONNECT_DELAYED);
g_return_val_if_fail (pad != NULL, GST_PAD_CONNECT_DELAYED);
- if (ladspa->samplerate != gst_caps_get_int (caps, "rate")) {
- ladspa->samplerate = gst_caps_get_int (caps, "rate");
+ gst_caps_get_int (caps, "rate", &rate);
+
+ if (ladspa->samplerate != rate) {
+ ladspa->samplerate = rate;
if (! gst_ladspa_instantiate(ladspa))
return GST_PAD_CONNECT_REFUSED;
}
@@ -674,7 +679,7 @@ gst_ladspa_deactivate(GstLADSPA *ladspa)
static void
gst_ladspa_loop (GstElement *element)
{
- gint8 *raw_in, *zero_out, i, cur_buf;
+ gint8 *raw_in, *zero_out, i;
GstBuffer **buffers_out;
GstEvent *event = NULL;
guint32 waiting;
@@ -703,7 +708,8 @@ gst_ladspa_loop (GstElement *element)
/* first get all the necessary data from the input ports */
for (i=0;i<oclass->numsinkpads;i++){
- GST_DEBUG (0, "pulling %d bytes through channel %d's bytestream", i);
+ GST_DEBUG (0, "pulling %d bytes through channel %d'sbytestream\n",
+ ladspa->buffersize * sizeof (LADSPA_Data), i);
raw_in = gst_bytestream_peek_bytes (ladspa->bytestreams[i], ladspa->buffersize * sizeof (LADSPA_Data));
if (raw_in == NULL) {
diff --git a/ext/sdl/sdlvideosink.c b/ext/sdl/sdlvideosink.c
index ab22310d..22e5e11d 100644
--- a/ext/sdl/sdlvideosink.c
+++ b/ext/sdl/sdlvideosink.c
@@ -365,8 +365,12 @@ gst_sdlvideosink_sinkconnect (GstPad *pad,
for (caps = vscapslist; caps != NULL; caps = vscapslist = vscapslist->next)
{
+ guint32 format;
+
+ gst_caps_get_fourcc_int(caps, "format", &format);
+
/* check whether it's in any way compatible */
- switch (gst_caps_get_fourcc_int(caps, "format"))
+ switch (format)
{
case GST_MAKE_FOURCC('I','4','2','0'):
case GST_MAKE_FOURCC('I','Y','U','V'):
@@ -374,10 +378,9 @@ gst_sdlvideosink_sinkconnect (GstPad *pad,
case GST_MAKE_FOURCC('Y','U','Y','2'):
case GST_MAKE_FOURCC('Y','V','Y','U'):
case GST_MAKE_FOURCC('U','Y','V','Y'):
- sdlvideosink->format = gst_sdlvideosink_get_sdl_from_fourcc(sdlvideosink,
- gst_caps_get_fourcc_int(caps, "format"));
- sdlvideosink->image_width = gst_caps_get_int(caps, "width");
- sdlvideosink->image_height = gst_caps_get_int(caps, "height");
+ sdlvideosink->format = gst_sdlvideosink_get_sdl_from_fourcc (sdlvideosink, format);
+ gst_caps_get_int(caps, "width", &sdlvideosink->image_width);
+ gst_caps_get_int(caps, "height", &sdlvideosink->image_height);
/* try it out */
if (!gst_sdlvideosink_create(sdlvideosink, TRUE))
diff --git a/ext/tarkin/gsttarkinenc.c b/ext/tarkin/gsttarkinenc.c
index 4babb7e6..3d3128a4 100644
--- a/ext/tarkin/gsttarkinenc.c
+++ b/ext/tarkin/gsttarkinenc.c
@@ -130,8 +130,8 @@ gst_tarkinenc_sinkconnect (GstPad *pad, GstCaps *caps)
tarkinenc->layer[0].bitstream_len = tarkinenc->bitrate;
tarkinenc->layer[0].a_moments = tarkinenc->a_moments;
tarkinenc->layer[0].s_moments = tarkinenc->s_moments;
- tarkinenc->layer[0].width = gst_caps_get_int (caps, "width");
- tarkinenc->layer[0].height = gst_caps_get_int (caps, "height");
+ gst_caps_get_int (caps, "width", &tarkinenc->layer[0].width);
+ gst_caps_get_int (caps, "height", &tarkinenc->layer[0].height);
tarkinenc->layer[0].format = TARKIN_RGB24;
tarkinenc->layer[0].frames_per_buf = TARKIN_RGB24;
diff --git a/ext/tarkin/tarkin.c b/ext/tarkin/tarkin.c
index 1804fc5f..a9e24afc 100644
--- a/ext/tarkin/tarkin.c
+++ b/ext/tarkin/tarkin.c
@@ -139,7 +139,7 @@ extern int tarkin_analysis_add_layer(TarkinStream *s,
}
/*
max_bitstream_len += layer->desc.bitstream_len
- + 2 * 10 * sizeof(uint32_t) * layer->n_comp; /* truncation tables */
+ + 2 * 10 * sizeof(uint32_t) * layer->n_comp;
*/
return (TARKIN_OK);
}
diff --git a/gst-libs/gst/audio/audio.c b/gst-libs/gst/audio/audio.c
index a5dfd1ea..7889bbe9 100644
--- a/gst-libs/gst/audio/audio.c
+++ b/gst-libs/gst/audio/audio.c
@@ -40,8 +40,8 @@ gst_audio_frame_byte_size (GstPad* pad)
/* ERROR: could not get caps of pad */
return 0;
- width = gst_caps_get_int (caps, "width");
- channels = gst_caps_get_int (caps, "channels");
+ gst_caps_get_int (caps, "width", &width);
+ gst_caps_get_int (caps, "channels", &channels);
return (width / 8) * channels;
}
@@ -73,6 +73,7 @@ gst_audio_frame_rate (GstPad *pad)
*/
{
GstCaps *caps = NULL;
+ gint rate;
/* get caps of pad */
caps = GST_PAD_CAPS (pad);
@@ -80,8 +81,10 @@ gst_audio_frame_rate (GstPad *pad)
if (caps == NULL)
/* ERROR: could not get caps of pad */
return 0;
- else
- return gst_caps_get_int (caps, "rate");
+ else {
+ gst_caps_get_int (caps, "rate", &rate);
+ return rate;
+ }
}
double
@@ -95,7 +98,7 @@ gst_audio_length (GstPad* pad, GstBuffer* buf)
long bytes = 0;
int width = 0;
int channels = 0;
- long rate = 0L;
+ int rate = 0;
double length;
@@ -111,9 +114,9 @@ gst_audio_length (GstPad* pad, GstBuffer* buf)
else
{
bytes = GST_BUFFER_SIZE (buf);
- width = gst_caps_get_int (caps, "width");
- channels = gst_caps_get_int (caps, "channels");
- rate = gst_caps_get_int (caps, "rate");
+ gst_caps_get_int (caps, "width", &width);
+ gst_caps_get_int (caps, "channels", &channels);
+ gst_caps_get_int (caps, "rate", &rate);
length = (bytes * 8.0) / (double) (rate * channels * width);
}
@@ -134,8 +137,10 @@ gst_audio_highest_sample_value (GstPad* pad)
/* FIXME : Please change this to a better warning method ! */
if (caps == NULL)
printf ("WARNING: gstaudio: could not get caps of pad !\n");
- width = gst_caps_get_int (caps, "width");
- is_signed = gst_caps_get_boolean (caps, "signed");
+
+ gst_caps_get_int (caps, "width", &width);
+ gst_caps_get_boolean (caps, "signed", &is_signed);
+
if (is_signed) --width;
/* example : 16 bit, signed : samples between -32768 and 32767 */
return ((long) (1 << width));
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;
}