2 * Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
4 * mixer.h: mixer interface design
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
22 #ifndef __GST_MIXER_H__
23 #define __GST_MIXER_H__
26 #include <gst/mixer/mixertrack.h>
27 #include <gst/mixer/mixerenumtypes.h>
31 #define GST_TYPE_MIXER \
32 (gst_mixer_get_type ())
33 #define GST_MIXER(obj) \
34 (GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_MIXER, GstMixer))
35 #define GST_MIXER_CLASS(klass) \
36 (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_MIXER, GstMixerClass))
37 #define GST_IS_MIXER(obj) \
38 (GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_MIXER))
39 #define GST_IS_MIXER_CLASS(klass) \
40 (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MIXER))
41 #define GST_MIXER_GET_CLASS(inst) \
42 (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_MIXER, GstMixerClass))
44 #define GST_MIXER_TYPE(klass) (klass->mixer_type)
46 typedef struct _GstMixer GstMixer;
54 typedef struct _GstMixerClass {
57 GstMixerType mixer_type;
59 /* virtual functions */
60 const GList * (* list_tracks) (GstMixer *mixer);
62 void (* set_volume) (GstMixer *mixer,
65 void (* get_volume) (GstMixer *mixer,
69 void (* set_mute) (GstMixer *mixer,
72 void (* set_record) (GstMixer *mixer,
77 void (* mute_toggled) (GstMixer *mixer,
78 GstMixerTrack *channel,
80 void (* record_toggled) (GstMixer *mixer,
81 GstMixerTrack *channel,
83 void (* volume_changed) (GstMixer *mixer,
84 GstMixerTrack *channel,
87 gpointer _gst_reserved[GST_PADDING];
90 GType gst_mixer_get_type (void);
92 /* virtual class function wrappers */
93 const GList * gst_mixer_list_tracks (GstMixer *mixer);
94 void gst_mixer_set_volume (GstMixer *mixer,
97 void gst_mixer_get_volume (GstMixer *mixer,
100 void gst_mixer_set_mute (GstMixer *mixer,
101 GstMixerTrack *track,
103 void gst_mixer_set_record (GstMixer *mixer,
104 GstMixerTrack *track,
107 /* trigger signals */
108 void gst_mixer_mute_toggled (GstMixer *mixer,
109 GstMixerTrack *track,
111 void gst_mixer_record_toggled (GstMixer *mixer,
112 GstMixerTrack *track,
114 void gst_mixer_volume_changed (GstMixer *mixer,
115 GstMixerTrack *track,
120 #endif /* __GST_MIXER_H__ */