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/interfaces/mixeroptions.h>
27 #include <gst/interfaces/mixertrack.h>
28 #include <gst/interfaces/interfaces-enumtypes.h>
32 #define GST_TYPE_MIXER \
33 (gst_mixer_get_type ())
34 #define GST_MIXER(obj) \
35 (GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_MIXER, GstMixer))
36 #define GST_MIXER_CLASS(klass) \
37 (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_MIXER, GstMixerClass))
38 #define GST_IS_MIXER(obj) \
39 (GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_MIXER))
40 #define GST_IS_MIXER_CLASS(klass) \
41 (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MIXER))
42 #define GST_MIXER_GET_CLASS(inst) \
43 (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_MIXER, GstMixerClass))
45 #define GST_MIXER_TYPE(klass) (klass->mixer_type)
47 typedef struct _GstMixer GstMixer;
48 typedef struct _GstMixerClass GstMixerClass;
56 struct _GstMixerClass {
59 GstMixerType mixer_type;
61 /* virtual functions */
62 const GList * (* list_tracks) (GstMixer *mixer);
64 void (* set_volume) (GstMixer *mixer,
67 void (* get_volume) (GstMixer *mixer,
71 void (* set_mute) (GstMixer *mixer,
74 void (* set_record) (GstMixer *mixer,
79 void (* mute_toggled) (GstMixer *mixer,
80 GstMixerTrack *channel,
82 void (* record_toggled) (GstMixer *mixer,
83 GstMixerTrack *channel,
85 void (* volume_changed) (GstMixer *mixer,
86 GstMixerTrack *channel,
89 void (* set_option) (GstMixer *mixer,
90 GstMixerOptions *opts,
92 const gchar * (* get_option) (GstMixer *mixer,
93 GstMixerOptions *opts);
95 void (* option_changed) (GstMixer *mixer,
96 GstMixerOptions *opts,
100 gpointer _gst_reserved[GST_PADDING];
103 GType gst_mixer_get_type (void);
105 /* virtual class function wrappers */
106 const GList * gst_mixer_list_tracks (GstMixer *mixer);
107 void gst_mixer_set_volume (GstMixer *mixer,
108 GstMixerTrack *track,
110 void gst_mixer_get_volume (GstMixer *mixer,
111 GstMixerTrack *track,
113 void gst_mixer_set_mute (GstMixer *mixer,
114 GstMixerTrack *track,
116 void gst_mixer_set_record (GstMixer *mixer,
117 GstMixerTrack *track,
119 void gst_mixer_set_option (GstMixer *mixer,
120 GstMixerOptions *opts,
122 const gchar * gst_mixer_get_option (GstMixer *mixer,
123 GstMixerOptions *opts);
125 /* trigger signals */
126 void gst_mixer_mute_toggled (GstMixer *mixer,
127 GstMixerTrack *track,
129 void gst_mixer_record_toggled (GstMixer *mixer,
130 GstMixerTrack *track,
132 void gst_mixer_volume_changed (GstMixer *mixer,
133 GstMixerTrack *track,
135 void gst_mixer_option_changed (GstMixer *mixer,
136 GstMixerOptions *opts,
141 #endif /* __GST_MIXER_H__ */