|
1 /* GStreamer Mixer |
|
2 * Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net> |
|
3 * |
|
4 * mixertrack.h: mixer track object |
|
5 * |
|
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. |
|
10 * |
|
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. |
|
15 * |
|
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. |
|
20 */ |
|
21 |
|
22 #ifndef __GST_MIXER_TRACK_H__ |
|
23 #define __GST_MIXER_TRACK_H__ |
|
24 |
|
25 #include <gst/gst.h> |
|
26 |
|
27 G_BEGIN_DECLS |
|
28 |
|
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, \ |
|
33 GstMixerTrack)) |
|
34 #define GST_MIXER_TRACK_CLASS(klass) \ |
|
35 (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_MIXER_TRACK, \ |
|
36 GstMixerTrackClass)) |
|
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)) |
|
41 |
|
42 /* |
|
43 * Naming: |
|
44 * |
|
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. |
|
49 * |
|
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. |
|
56 */ |
|
57 |
|
58 typedef enum { |
|
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) |
|
65 } GstMixerTrackFlags; |
|
66 |
|
67 #define GST_MIXER_TRACK_HAS_FLAG(channel, flag) \ |
|
68 ((channel)->flags & flag) |
|
69 |
|
70 typedef struct _GstMixerTrack GstMixerTrack; |
|
71 typedef struct _GstMixerTrackClass GstMixerTrackClass; |
|
72 |
|
73 struct _GstMixerTrack { |
|
74 GObject parent; |
|
75 |
|
76 gchar *label; |
|
77 |
|
78 /* FIXME 0.11: flags should be guint32 */ |
|
79 GstMixerTrackFlags flags; |
|
80 |
|
81 gint num_channels; |
|
82 gint min_volume; |
|
83 gint max_volume; |
|
84 |
|
85 /* FIXME 0.11: add padding */ |
|
86 }; |
|
87 |
|
88 struct _GstMixerTrackClass { |
|
89 GObjectClass parent; |
|
90 |
|
91 #ifdef GST_MIXER_NEED_DEPRECATED |
|
92 /* signals (deprecated) */ |
|
93 void (* mute_toggled) (GstMixerTrack *channel, |
|
94 gboolean mute); |
|
95 void (* record_toggled) (GstMixerTrack *channel, |
|
96 gboolean record); |
|
97 void (* volume_changed) (GstMixerTrack *channel, |
|
98 gint *volumes); |
|
99 #endif /* GST_MIXER_NEED_DEPRECATED */ |
|
100 |
|
101 gpointer _gst_reserved[GST_PADDING]; |
|
102 }; |
|
103 #ifdef __SYMBIAN32__ |
|
104 IMPORT_C |
|
105 #endif |
|
106 |
|
107 |
|
108 GType gst_mixer_track_get_type (void); |
|
109 |
|
110 G_END_DECLS |
|
111 |
|
112 #endif /* __GST_MIXER_TRACK_H__ */ |