blob: 75101bd20a6f150c59cce862e80445e1f1d49951 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
/* $Id$ */
/***
This file is part of gst-polyp.
gst-polyp is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
gst-polyp is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with gst-polyp; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA.
***/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gst/gst.h>
#include "polypmixertrack.h"
GST_DEBUG_CATEGORY_EXTERN(polyp_debug);
#define GST_CAT_DEFAULT polyp_debug
G_DEFINE_TYPE(GstPolypMixerTrack, gst_polypmixer_track, GST_TYPE_MIXER_TRACK);
static void gst_polypmixer_track_class_init(GstPolypMixerTrackClass *klass) {
}
static void gst_polypmixer_track_init(GstPolypMixerTrack *track) {
track->control = NULL;
}
GstMixerTrack *gst_polypmixer_track_new(GstPolypMixerCtrl *control) {
GstPolypMixerTrack *polyptrack;
GstMixerTrack *track;
polyptrack = g_object_new(GST_TYPE_POLYPMIXER_TRACK, NULL);
polyptrack->control = control;
track = GST_MIXER_TRACK(polyptrack);
track->label = g_strdup("Master");
track->num_channels = control->channel_map.channels;
track->flags =
(control->type == GST_POLYPMIXER_SINK ? GST_MIXER_TRACK_OUTPUT|GST_MIXER_TRACK_MASTER : GST_MIXER_TRACK_INPUT|GST_MIXER_TRACK_RECORD) |
(control->muted ? GST_MIXER_TRACK_MUTE : 0);
track->min_volume = PA_VOLUME_MUTED;
track->max_volume = PA_VOLUME_NORM;
return track;
}
|