summaryrefslogtreecommitdiffstats
path: root/gst/chart
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@mad.scientist.com>2004-11-12 17:37:49 +0000
committerJan Schmidt <thaytan@mad.scientist.com>2004-11-12 17:37:49 +0000
commit352cb6fef9ba3d73a3376244498e01498be68d43 (patch)
tree797516d8b1f8e2caf871b6ebbadbb9bf3bb98373 /gst/chart
parentbf61de8fe09a4f2c0d1109bc509ea8e4759fe222 (diff)
downloadgst-plugins-bad-352cb6fef9ba3d73a3376244498e01498be68d43.tar.gz
gst-plugins-bad-352cb6fef9ba3d73a3376244498e01498be68d43.tar.bz2
gst-plugins-bad-352cb6fef9ba3d73a3376244498e01498be68d43.zip
Update libvisual to 0.1.7. Link in the debug handling to gstreamer
Original commit message from CVS: * configure.ac: * ext/libvisual/visual.c: (gst_visual_get_type), (libvisual_log_handler), (gst_visual_getcaps), (gst_visual_srclink), (gst_visual_change_state), (make_valid_name), (plugin_init): Update libvisual to 0.1.7. Link in the debug handling to gstreamer * ext/smoothwave/Makefile.am: * ext/smoothwave/demo-osssrc.c: (main): * ext/smoothwave/gstsmoothwave.c: (gst_smoothwave_class_init), (gst_smoothwave_init), (gst_smoothwave_dispose), (gst_sw_sinklink), (gst_sw_srclink), (gst_smoothwave_chain), (gst_sw_change_state), (plugin_init): * ext/smoothwave/gstsmoothwave.h: Make gstsmoothwave a working element in the 20th century. * gst/chart/gstchart.c: (gst_chart_init), (gst_chart_srcconnect): Fix incorrect link function
Diffstat (limited to 'gst/chart')
-rw-r--r--gst/chart/gstchart.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/gst/chart/gstchart.c b/gst/chart/gstchart.c
index 6b5eb456..d84eadcd 100644
--- a/gst/chart/gstchart.c
+++ b/gst/chart/gstchart.c
@@ -184,7 +184,7 @@ gst_chart_init (GstChart * chart)
gst_pad_set_chain_function (chart->sinkpad, gst_chart_chain);
gst_pad_set_link_function (chart->sinkpad, gst_chart_sinkconnect);
- gst_pad_set_link_function (chart->sinkpad, gst_chart_srcconnect);
+ gst_pad_set_link_function (chart->srcpad, gst_chart_srcconnect);
chart->next_time = 0;
@@ -229,13 +229,12 @@ gst_chart_srcconnect (GstPad * pad, const GstCaps * caps)
structure = gst_caps_get_structure (caps, 0);
- if (gst_structure_get_double (structure, "framerate", &chart->framerate)) {
- chart->samples_between_frames = chart->samplerate / chart->framerate;
- }
-
- gst_structure_get_int (structure, "width", &chart->width);
- gst_structure_get_int (structure, "height", &chart->height);
+ if (!gst_structure_get_double (structure, "framerate", &chart->framerate) ||
+ !gst_structure_get_int (structure, "width", &chart->width) ||
+ !gst_structure_get_int (structure, "height", &chart->height))
+ return GST_PAD_LINK_REFUSED;
+ chart->samples_between_frames = chart->samplerate / chart->framerate;
GST_DEBUG ("CHART: new src caps: framerate %f, %dx%d",
chart->framerate, chart->width, chart->height);