2002-03-20 21:45:03 +00:00
|
|
|
/* GStreamer
|
2005-09-01 20:23:22 +00:00
|
|
|
* Copyright (C) 1999 Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
* Copyright (C) 2000,2001,2002,2003,2005
|
2003-09-21 12:21:49 +00:00
|
|
|
* Thomas Vander Stichele <thomas at apestaart dot org>
|
|
|
|
*
|
2001-12-22 23:27:31 +00:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __GST_LEVEL_H__
|
|
|
|
#define __GST_LEVEL_H__
|
|
|
|
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
2005-07-04 14:02:46 +00:00
|
|
|
#include <gst/base/gstbasetransform.h>
|
2001-12-22 23:27:31 +00:00
|
|
|
|
|
|
|
|
2005-07-04 14:02:46 +00:00
|
|
|
G_BEGIN_DECLS
|
2001-12-22 23:27:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
#define GST_TYPE_LEVEL \
|
|
|
|
(gst_level_get_type())
|
|
|
|
#define GST_LEVEL(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_LEVEL,GstLevel))
|
|
|
|
#define GST_LEVEL_CLASS(klass) \
|
2006-04-08 19:06:25 +00:00
|
|
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_LEVEL,GstLevelClass))
|
|
|
|
#define GST_LEVEL_GET_CLASS(obj) \
|
|
|
|
(G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_LEVEL,GstLevelClass))
|
2001-12-22 23:27:31 +00:00
|
|
|
#define GST_IS_LEVEL(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_LEVEL))
|
2006-04-08 19:06:25 +00:00
|
|
|
#define GST_IS_LEVEL_CLASS(klass) \
|
2001-12-22 23:27:31 +00:00
|
|
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_LEVEL))
|
|
|
|
|
2005-07-04 14:02:46 +00:00
|
|
|
|
2004-03-15 16:32:54 +00:00
|
|
|
typedef struct _GstLevel GstLevel;
|
|
|
|
typedef struct _GstLevelClass GstLevelClass;
|
|
|
|
|
2007-02-21 10:18:12 +00:00
|
|
|
/**
|
|
|
|
* GstLevel:
|
|
|
|
*
|
|
|
|
* Opaque data structure.
|
|
|
|
*/
|
2004-03-15 16:32:54 +00:00
|
|
|
struct _GstLevel {
|
2005-07-04 14:02:46 +00:00
|
|
|
GstBaseTransform element;
|
2004-03-15 16:32:54 +00:00
|
|
|
|
2005-12-06 19:44:58 +00:00
|
|
|
gboolean message; /* whether or not to post messages */
|
2006-09-11 20:38:41 +00:00
|
|
|
guint64 interval; /* how many seconds between emits */
|
2004-03-15 16:32:54 +00:00
|
|
|
|
2005-12-06 19:44:58 +00:00
|
|
|
gint rate; /* caps variables */
|
2004-03-15 16:32:54 +00:00
|
|
|
gint width;
|
|
|
|
gint channels;
|
|
|
|
|
2005-12-06 19:44:58 +00:00
|
|
|
gdouble decay_peak_ttl; /* time to live for peak in seconds */
|
|
|
|
gdouble decay_peak_falloff; /* falloff in dB/sec */
|
|
|
|
gint num_frames; /* frame count (1 sample per channel)
|
2005-09-23 18:15:51 +00:00
|
|
|
* since last emit */
|
2009-10-31 22:29:24 +00:00
|
|
|
gint interval_frames; /* after how many frame to sent a message */
|
2008-08-10 11:32:03 +00:00
|
|
|
GstClockTime message_ts; /* starttime for next message */
|
2004-03-15 16:32:54 +00:00
|
|
|
|
|
|
|
/* per-channel arrays for intermediate values */
|
2005-12-06 19:44:58 +00:00
|
|
|
gdouble *CS; /* normalized Cumulative Square */
|
|
|
|
gdouble *peak; /* normalized Peak value over buffer */
|
|
|
|
gdouble *last_peak; /* last normalized Peak value over interval */
|
|
|
|
gdouble *decay_peak; /* running decaying normalized Peak */
|
|
|
|
gdouble *decay_peak_base; /* value of last peak we are decaying from */
|
|
|
|
gdouble *MS; /* normalized Mean Square of buffer */
|
|
|
|
gdouble *RMS_dB; /* RMS in dB to emit */
|
|
|
|
GstClockTime *decay_peak_age; /* age of last peak */
|
2007-02-21 10:18:12 +00:00
|
|
|
|
|
|
|
void (*process)(gpointer, guint, guint, gdouble*, gdouble*);
|
2004-03-15 16:32:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GstLevelClass {
|
2005-07-04 14:02:46 +00:00
|
|
|
GstBaseTransformClass parent_class;
|
2004-03-15 16:32:54 +00:00
|
|
|
};
|
|
|
|
|
add docs to build
Original commit message from CVS:
* Makefile.am:
* configure.ac:
add docs to build
* common/plugins.xsl:
wrap Description into a refsect2
* docs/Makefile.am:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-good-plugins-docs.sgml:
* docs/plugins/gst-plugins-good-plugins-sections.txt:
* gst/goom/Makefile.am:
* gst/goom/gstgoom.c: (gst_goom_get_type), (gst_goom_base_init),
(gst_goom_class_init), (gst_goom_init), (gst_goom_dispose),
(gst_goom_sink_setcaps), (gst_goom_src_setcaps),
(gst_goom_src_negotiate), (gst_goom_event), (gst_goom_chain),
(gst_goom_change_state):
* gst/goom/gstgoom.h:
GstGOOM -> GstGoom
add an example launch line
* gst/level/gstlevel.h:
* gst/monoscope/gstmonoscope.c:
cleanups
2005-09-01 17:55:14 +00:00
|
|
|
GType gst_level_get_type (void);
|
2001-12-22 23:27:31 +00:00
|
|
|
|
2005-07-04 14:02:46 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
2001-12-22 23:27:31 +00:00
|
|
|
|
|
|
|
|
2005-07-04 14:02:46 +00:00
|
|
|
#endif /* __GST_LEVEL_H__ */
|