upload tizen1.0 source
[framework/multimedia/gst-plugins-good0.10.git] / ext / pulse / pulsesink.h
1 /*-*- Mode: C; c-basic-offset: 2 -*-*/
2
3 /*
4  *  GStreamer pulseaudio plugin
5  *
6  *  Copyright (c) 2004-2008 Lennart Poettering
7  *
8  *  gst-pulse is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU Lesser General Public License as
10  *  published by the Free Software Foundation; either version 2.1 of the
11  *  License, or (at your option) any later version.
12  *
13  *  gst-pulse is distributed in the hope that it will be useful, but
14  *  WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  *  Lesser General Public License for more details.
17  *
18  *  You should have received a copy of the GNU Lesser General Public
19  *  License along with gst-pulse; if not, write to the Free Software
20  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21  *  USA.
22  */
23
24 #ifndef __GST_PULSESINK_H__
25 #define __GST_PULSESINK_H__
26
27 #include <gst/gst.h>
28 #include <gst/audio/gstaudiosink.h>
29
30 #include <pulse/pulseaudio.h>
31 #include <pulse/thread-mainloop.h>
32
33 #include "pulseprobe.h"
34
35 G_BEGIN_DECLS
36
37 #define GST_TYPE_PULSESINK \
38   (gst_pulsesink_get_type())
39 #define GST_PULSESINK(obj) \
40   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PULSESINK,GstPulseSink))
41 #define GST_PULSESINK_CLASS(klass) \
42   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PULSESINK,GstPulseSinkClass))
43 #define GST_IS_PULSESINK(obj) \
44   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PULSESINK))
45 #define GST_IS_PULSESINK_CLASS(obj) \
46   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PULSESINK))
47 #define GST_PULSESINK_CAST(obj) \
48   ((GstPulseSink *)(obj))
49
50 typedef struct _GstPulseSink GstPulseSink;
51 typedef struct _GstPulseSinkClass GstPulseSinkClass;
52
53 struct _GstPulseSink
54 {
55   GstBaseAudioSink sink;
56
57   gchar *server, *device, *stream_name, *client_name;
58   gchar *device_description;
59
60   GstPulseProbe *probe;
61
62   gdouble volume;
63   gboolean volume_set:1;
64   gboolean mute:1;
65   gboolean mute_set:1;
66
67   gboolean pa_defer_ran:1;
68
69   gint notify; /* atomic */
70
71   const gchar *pa_version;
72
73   GstStructure *properties;
74   pa_proplist *proplist;
75 };
76
77 struct _GstPulseSinkClass
78 {
79   GstBaseAudioSinkClass parent_class;
80 };
81
82 GType gst_pulsesink_get_type (void);
83
84 G_END_DECLS
85
86 #endif /* __GST_PULSESINK_H__ */