summaryrefslogtreecommitdiffstats
path: root/gst/cutter
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2002-09-09 08:47:32 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2002-09-09 08:47:32 +0000
commit33362b9128bc56763501f078f6c49b7a149a3663 (patch)
tree50d9d00478eea92ab902f09603b787d4a11c08b9 /gst/cutter
parent41fc985089e14e1172fd67df01d03f00825d0dd7 (diff)
small cleanups
Original commit message from CVS: small cleanups
Diffstat (limited to 'gst/cutter')
-rw-r--r--gst/cutter/gstcutter.c21
-rw-r--r--gst/cutter/gstcutter.h9
2 files changed, 16 insertions, 14 deletions
diff --git a/gst/cutter/gstcutter.c b/gst/cutter/gstcutter.c
index 3faa0171..065f81c1 100644
--- a/gst/cutter/gstcutter.c
+++ b/gst/cutter/gstcutter.c
@@ -213,8 +213,9 @@ gst_cutter_chain (GstPad *pad, GstBuffer *buf)
if (!filter->have_caps) gst_cutter_get_caps (pad, filter);
in_data = (gint16 *) GST_BUFFER_DATA (buf);
- GST_DEBUG(GST_CAT_PLUGIN_INFO, "cutter: length of prerec buffer: %.3f sec\n",
- filter->pre_run_length);
+ GST_DEBUG (GST_CAT_PLUGIN_INFO,
+ "cutter: length of prerec buffer: %.3f sec\n",
+ filter->pre_run_length);
/* calculate mean square value on buffer */
switch (filter->width)
@@ -309,12 +310,12 @@ gst_cutter_8bit_ms (gint8* data, guint num_samples)
#include "filter.func"
static void
-gst_cutter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+gst_cutter_set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec)
{
GstCutter *filter;
- /* it's not null if we got it, but it might not be ours */
- g_return_if_fail(GST_IS_CUTTER (object));
+ g_return_if_fail (GST_IS_CUTTER (object));
filter = GST_CUTTER (object);
switch (prop_id)
@@ -351,12 +352,12 @@ gst_cutter_set_property (GObject *object, guint prop_id, const GValue *value, GP
}
static void
-gst_cutter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+gst_cutter_get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
{
GstCutter *filter;
- /* it's not null if we got it, but it might not be ours */
- g_return_if_fail (GST_IS_CUTTER(object));
+ g_return_if_fail (GST_IS_CUTTER (object));
filter = GST_CUTTER (object);
switch (prop_id)
@@ -384,8 +385,8 @@ plugin_init (GModule *module, GstPlugin *plugin)
{
GstElementFactory *factory;
- factory = gst_element_factory_new("cutter",GST_TYPE_CUTTER,
- &cutter_details);
+ factory = gst_element_factory_new ("cutter", GST_TYPE_CUTTER,
+ &cutter_details);
g_return_val_if_fail(factory != NULL, FALSE);
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (cutter_src_factory));
diff --git a/gst/cutter/gstcutter.h b/gst/cutter/gstcutter.h
index 6a9c3fd9..973db4d2 100644
--- a/gst/cutter/gstcutter.h
+++ b/gst/cutter/gstcutter.h
@@ -54,8 +54,8 @@ struct _GstCutter
double threshold_level; /* level below which to cut */
double threshold_length; /* how long signal has to remain
- * below this level before cutting
- */
+ * below this level before cutting */
+
double silent_run_length; /* how long has it been below threshold ? */
gboolean silent;
@@ -68,13 +68,14 @@ struct _GstCutter
long max_sample; /* maximum sample value */
};
-struct _GstCutterClass {
+struct _GstCutterClass
+{
GstElementClass parent_class;
void (*cut_start) (GstCutter* filter);
void (*cut_stop) (GstCutter* filter);
};
-GType gst_cutter_get_type(void);
+GType gst_cutter_get_type (void);
#ifdef __cplusplus
}