mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
cleanups and clarifications
Original commit message from CVS: cleanups and clarifications
This commit is contained in:
parent
259097a3a7
commit
81fc9a9cb3
2 changed files with 27 additions and 21 deletions
|
@ -40,6 +40,6 @@
|
||||||
threshold_dB += 1;
|
threshold_dB += 1;
|
||||||
}
|
}
|
||||||
/* printf ("RMS in dB (for 16bit) : %f\n", RMS_dB); */
|
/* printf ("RMS in dB (for 16bit) : %f\n", RMS_dB); */
|
||||||
printf ("%f %f\n", timepoint, RMS_dB);
|
printf ("%f s %f dB\n", timepoint, RMS_dB);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -172,17 +172,21 @@ gst_level_chain (GstPad *pad, GstBuffer *buf)
|
||||||
|
|
||||||
in_data = (gint16 *) GST_BUFFER_DATA(buf);
|
in_data = (gint16 *) GST_BUFFER_DATA(buf);
|
||||||
outbuf = gst_buffer_new();
|
outbuf = gst_buffer_new();
|
||||||
GST_BUFFER_DATA (outbuf) = (gchar*) g_new (gint16, GST_BUFFER_SIZE(buf)/2);
|
GST_BUFFER_DATA (outbuf) = (gchar *) g_new (gint16,
|
||||||
|
GST_BUFFER_SIZE (buf) / 2);
|
||||||
GST_BUFFER_SIZE (outbuf) = GST_BUFFER_SIZE (buf);
|
GST_BUFFER_SIZE (outbuf) = GST_BUFFER_SIZE (buf);
|
||||||
|
|
||||||
out_data = (gint16 *) GST_BUFFER_DATA (outbuf);
|
out_data = (gint16 *) GST_BUFFER_DATA (outbuf);
|
||||||
|
|
||||||
|
g_print ("%s: ", gst_element_get_name (GST_ELEMENT (filter)));
|
||||||
switch (width) {
|
switch (width) {
|
||||||
case 16:
|
case 16:
|
||||||
gst_level_fast_16bit_chain(in_data,&out_data,GST_BUFFER_SIZE(buf)/2);
|
gst_level_fast_16bit_chain (in_data, &out_data,
|
||||||
|
GST_BUFFER_SIZE (buf) / 2);
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
gst_level_fast_8bit_chain((gint8*)in_data,(gint8**)&out_data,GST_BUFFER_SIZE(buf));
|
gst_level_fast_8bit_chain ((gint8 *) in_data,
|
||||||
|
(gint8 **) &out_data, GST_BUFFER_SIZE(buf));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
gst_buffer_unref (buf);
|
gst_buffer_unref (buf);
|
||||||
|
@ -200,7 +204,8 @@ gst_level_fast_8bit_chain(gint8* in_data, gint8** out_data,
|
||||||
#include "filter.func"
|
#include "filter.func"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_level_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
|
gst_level_set_property (GObject *object, guint prop_id,
|
||||||
|
const GValue *value, GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GstLevel *filter;
|
GstLevel *filter;
|
||||||
|
|
||||||
|
@ -215,7 +220,8 @@ gst_level_set_property (GObject *object, guint prop_id, const GValue *value, GPa
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_level_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
|
gst_level_get_property (GObject *object, guint prop_id,
|
||||||
|
GValue *value, GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GstLevel *filter;
|
GstLevel *filter;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue