1 /* -*- c-basic-offset: 2 -*-
2 * vi:si:et:sw=2:sts=8:ts=8:expandtab
5 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
6 * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
24 #ifndef __GST_VOLUME_H__
25 #define __GST_VOLUME_H__
28 #include <gst/base/gstbasetransform.h>
29 #include <gst/audio/streamvolume.h>
30 #include <gst/audio/audio.h>
31 #include <gst/audio/gstaudiofilter.h>
35 #define GST_TYPE_VOLUME \
36 (gst_volume_get_type())
37 #define GST_VOLUME(obj) \
38 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VOLUME,GstVolume))
39 #define GST_VOLUME_CLASS(klass) \
40 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VOLUME,GstVolumeClass))
41 #define GST_IS_VOLUME(obj) \
42 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VOLUME))
43 #define GST_IS_VOLUME_CLASS(klass) \
44 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VOLUME))
46 typedef struct _GstVolume GstVolume;
47 typedef struct _GstVolumeClass GstVolumeClass;
52 * Opaque data structure.
55 GstAudioFilter element;
57 void (*process)(GstVolume*, gpointer, guint);
58 void (*process_controlled)(GstVolume*, gpointer, gdouble *, guint, guint);
63 gboolean current_mute;
64 gfloat current_volume;
67 gint current_vol_i24; /* the _i(nt) values get synchronized with the */
68 gint current_vol_i16; /* the _i(nt) values get synchronized with the */
69 gint current_vol_i8; /* the _i(nt) values get synchronized with the */
80 struct _GstVolumeClass {
81 GstAudioFilterClass parent_class;
84 GType gst_volume_get_type (void);
88 #endif /* __GST_VOLUME_H__ */