mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-28 18:18:38 +00:00
small cleanups
Original commit message from CVS: small cleanups
This commit is contained in:
parent
41fc985089
commit
33362b9128
2 changed files with 16 additions and 14 deletions
|
@ -213,7 +213,8 @@ gst_cutter_chain (GstPad *pad, GstBuffer *buf)
|
||||||
if (!filter->have_caps) gst_cutter_get_caps (pad, filter);
|
if (!filter->have_caps) gst_cutter_get_caps (pad, filter);
|
||||||
|
|
||||||
in_data = (gint16 *) GST_BUFFER_DATA (buf);
|
in_data = (gint16 *) GST_BUFFER_DATA (buf);
|
||||||
GST_DEBUG(GST_CAT_PLUGIN_INFO, "cutter: length of prerec buffer: %.3f sec\n",
|
GST_DEBUG (GST_CAT_PLUGIN_INFO,
|
||||||
|
"cutter: length of prerec buffer: %.3f sec\n",
|
||||||
filter->pre_run_length);
|
filter->pre_run_length);
|
||||||
|
|
||||||
/* calculate mean square value on buffer */
|
/* calculate mean square value on buffer */
|
||||||
|
@ -309,11 +310,11 @@ gst_cutter_8bit_ms (gint8* data, guint num_samples)
|
||||||
#include "filter.func"
|
#include "filter.func"
|
||||||
|
|
||||||
static void
|
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;
|
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);
|
filter = GST_CUTTER (object);
|
||||||
|
|
||||||
|
@ -351,11 +352,11 @@ gst_cutter_set_property (GObject *object, guint prop_id, const GValue *value, GP
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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;
|
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);
|
filter = GST_CUTTER (object);
|
||||||
|
|
||||||
|
|
|
@ -54,8 +54,8 @@ struct _GstCutter
|
||||||
|
|
||||||
double threshold_level; /* level below which to cut */
|
double threshold_level; /* level below which to cut */
|
||||||
double threshold_length; /* how long signal has to remain
|
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 ? */
|
double silent_run_length; /* how long has it been below threshold ? */
|
||||||
gboolean silent;
|
gboolean silent;
|
||||||
|
|
||||||
|
@ -68,7 +68,8 @@ struct _GstCutter
|
||||||
long max_sample; /* maximum sample value */
|
long max_sample; /* maximum sample value */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstCutterClass {
|
struct _GstCutterClass
|
||||||
|
{
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
void (*cut_start) (GstCutter* filter);
|
void (*cut_start) (GstCutter* filter);
|
||||||
void (*cut_stop) (GstCutter* filter);
|
void (*cut_stop) (GstCutter* filter);
|
||||||
|
|
Loading…
Reference in a new issue