From 14d79a36f3ee209a9f660f0a96df977760dc4d0f Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Mon, 12 Feb 2007 12:43:00 +0000 Subject: gst/goom/gstgoom.*: Improved docs and use GST_DEBUG_FUNCPTR. Original commit message from CVS: * gst/goom/gstgoom.c: (gst_goom_class_init), (gst_goom_init), (gst_goom_change_state): * gst/goom/gstgoom.h: Improved docs and use GST_DEBUG_FUNCPTR. * gst/level/gstlevel.c: (gst_level_class_init): Use GST_DEBUG_FUNCPTR. * gst/monoscope/gstmonoscope.c: (gst_monoscope_init), (gst_monoscope_chain), (gst_monoscope_change_state): Improved docs source cleanups. --- gst/monoscope/gstmonoscope.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'gst/monoscope') diff --git a/gst/monoscope/gstmonoscope.c b/gst/monoscope/gstmonoscope.c index 9d84cd91..4221ee48 100644 --- a/gst/monoscope/gstmonoscope.c +++ b/gst/monoscope/gstmonoscope.c @@ -21,9 +21,13 @@ /** * SECTION:element-monoscope - * @see_also: monoscope + * @see_also: goom * * + * + * Synaesthesia is an audio visualisation element. It creates a colored + * curve of the audio signal like on an oszilloscope. + * * Example launch line * * @@ -159,6 +163,9 @@ gst_monoscope_init (GstMonoscope * monoscope, GstMonoscopeClass * klass) monoscope->fps_num = 25; /* desired frame rate */ monoscope->fps_denom = 1; monoscope->visstate = NULL; + + /* reset the initial audio state */ + monoscope->rate = GST_AUDIO_DEF_RATE; } static void @@ -309,8 +316,8 @@ get_buffer (GstMonoscope * monoscope, GstBuffer ** outbuf) static GstFlowReturn gst_monoscope_chain (GstPad * pad, GstBuffer * inbuf) { + GstFlowReturn flow_ret = GST_FLOW_OK; GstMonoscope *monoscope; - GstFlowReturn flow_ret; monoscope = GST_MONOSCOPE (GST_PAD_PARENT (pad)); @@ -331,8 +338,6 @@ gst_monoscope_chain (GstPad * pad, GstBuffer * inbuf) gst_adapter_push (monoscope->adapter, inbuf); inbuf = NULL; - flow_ret = GST_FLOW_OK; - /* Collect samples until we have enough for an output frame */ while (flow_ret == GST_FLOW_OK) { gint16 *samples; @@ -516,7 +521,6 @@ gst_monoscope_change_state (GstElement * element, GstStateChange transition) GstMonoscope *monoscope = GST_MONOSCOPE (element); GstStateChangeReturn ret; - switch (transition) { case GST_STATE_CHANGE_NULL_TO_READY: break; -- cgit