2 * Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
4 * mixertrack.h: mixer track object
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_TRACK_H__
23 #define __GST_MIXER_TRACK_H__
29 #define GST_TYPE_MIXER_TRACK \
30 (gst_mixer_track_get_type ())
31 #define GST_MIXER_TRACK(obj) \
32 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_MIXER_TRACK, \
34 #define GST_MIXER_TRACK_CLASS(klass) \
35 (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_MIXER_TRACK, \
37 #define GST_IS_MIXER_TRACK(obj) \
38 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_MIXER_TRACK))
39 #define GST_IS_MIXER_TRACK_CLASS(klass) \
40 (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MIXER_TRACK))
45 * A track is a single input/output stream (e.g. line-in,
46 * microphone, etc.). Channels are then single streams
47 * within a track. A mono stream has one channel, a stereo
48 * stream has two, etc.
50 * Input tracks can have 'recording' enabled, which means
51 * that any input will be hearable into the speakers that
52 * are attached to the output. Mute is obvious. A track
53 * flagged as master is the master volume track on this
54 * mixer, which means that setting this track will change
55 * the hearable volume on any output.
59 GST_MIXER_TRACK_INPUT = (1<<0),
60 GST_MIXER_TRACK_OUTPUT = (1<<1),
61 GST_MIXER_TRACK_MUTE = (1<<2),
62 GST_MIXER_TRACK_RECORD = (1<<3),
63 GST_MIXER_TRACK_MASTER = (1<<4),
64 GST_MIXER_TRACK_SOFTWARE = (1<<5)
67 #define GST_MIXER_TRACK_HAS_FLAG(channel, flag) \
68 ((channel)->flags & flag)
70 typedef struct _GstMixerTrack GstMixerTrack;
71 typedef struct _GstMixerTrackClass GstMixerTrackClass;
73 struct _GstMixerTrack {
77 /* FIXME: flags should be guint32. Change in 0.9 */
78 GstMixerTrackFlags flags;
84 struct _GstMixerTrackClass {
88 void (* mute_toggled) (GstMixerTrack *channel,
90 void (* record_toggled) (GstMixerTrack *channel,
92 void (* volume_changed) (GstMixerTrack *channel,
95 gpointer _gst_reserved[GST_PADDING];
98 GType gst_mixer_track_get_type (void);
102 #endif /* __GST_MIXER_TRACK_H__ */