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: mixer track is for input
60 * @GST_MIXER_TRACK_OUTPUT: mixer track is for output
61 * @GST_MIXER_TRACK_MUTE: input or output is muted
62 * @GST_MIXER_TRACK_RECORD: input is audible in speakers attached to output
63 * (for #GST_MIXER_TRACK_INPUT mixer tracks only)
64 * @GST_MIXER_TRACK_MASTER: this mixer track is likely to be the master control
65 * @GST_MIXER_TRACK_SOFTWARE: mixer track's' volume control is implemented
66 * in software (as opposed to a hardware control)
67 * @GST_MIXER_TRACK_NO_RECORD: input track lacks support for recordable.
69 * @GST_MIXER_TRACK_NO_MUTE: play track doesn't support mute. Since: 0.10.23
70 * @GST_MIXER_TRACK_WHITELIST: track should be displayed "by default" in apps.
72 * @GST_MIXER_TRACK_READONLY: track is read-only. Since: 0.10.25
73 * @GST_MIXER_TRACK_WRITEONLY: track is write-only. Since: 0.10.25
78 GST_MIXER_TRACK_INPUT = (1<<0),
79 GST_MIXER_TRACK_OUTPUT = (1<<1),
80 GST_MIXER_TRACK_MUTE = (1<<2),
81 GST_MIXER_TRACK_RECORD = (1<<3),
82 GST_MIXER_TRACK_MASTER = (1<<4),
83 GST_MIXER_TRACK_SOFTWARE = (1<<5),
84 GST_MIXER_TRACK_NO_RECORD = (1<<6),
85 GST_MIXER_TRACK_NO_MUTE = (1<<7),
86 GST_MIXER_TRACK_WHITELIST = (1<<8),
87 GST_MIXER_TRACK_READONLY = (1<<9),
88 GST_MIXER_TRACK_WRITEONLY = (1<<10)
91 /* FIXME 0.11: READONLY/WRITEONLY -> READABLE/WRITABLE etc. */
93 #define GST_MIXER_TRACK_HAS_FLAG(channel, flag) \
94 ((channel)->flags & flag)
96 typedef struct _GstMixerTrack GstMixerTrack;
97 typedef struct _GstMixerTrackClass GstMixerTrackClass;
99 struct _GstMixerTrack {
104 /* FIXME 0.11: flags should be guint32 */
105 GstMixerTrackFlags flags;
111 /* FIXME 0.11: add padding */
114 struct _GstMixerTrackClass {
117 #ifdef GST_MIXER_NEED_DEPRECATED
118 /* signals (deprecated) */
119 void (* mute_toggled) (GstMixerTrack *channel,
121 void (* record_toggled) (GstMixerTrack *channel,
123 void (* volume_changed) (GstMixerTrack *channel,
125 #endif /* GST_MIXER_NEED_DEPRECATED */
127 gpointer _gst_reserved[GST_PADDING];
130 GType gst_mixer_track_get_type (void);
134 #endif /* __GST_MIXER_TRACK_H__ */