1 /*-*- Mode: C; c-basic-offset: 2 -*-*/
4 * GStreamer pulseaudio plugin
6 * Copyright (c) 2004-2008 Lennart Poettering
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.
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.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
24 #ifndef __GST_PULSESINK_H__
25 #define __GST_PULSESINK_H__
31 #if defined(__TIZEN__) && defined(PCM_DUMP_ENABLE)
36 #include <gst/audio/audio.h>
37 #include <gst/audio/gstaudiosink.h>
39 #include <pulse/pulseaudio.h>
40 #include <pulse/thread-mainloop.h>
42 #include "pulseutil.h"
46 #define GST_TYPE_PULSESINK \
47 (gst_pulsesink_get_type())
48 #define GST_PULSESINK(obj) \
49 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PULSESINK,GstPulseSink))
50 #define GST_PULSESINK_CLASS(klass) \
51 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PULSESINK,GstPulseSinkClass))
52 #define GST_IS_PULSESINK(obj) \
53 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PULSESINK))
54 #define GST_IS_PULSESINK_CLASS(obj) \
55 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PULSESINK))
56 #define GST_PULSESINK_CAST(obj) \
57 ((GstPulseSink *)(obj))
59 typedef struct _GstPulseSink GstPulseSink;
60 typedef struct _GstPulseSinkClass GstPulseSinkClass;
62 typedef struct _GstPulseDeviceInfo {
69 GstAudioBaseSink sink;
71 gchar *server, *device, *stream_name, *client_name;
72 GstPulseDeviceInfo device_info;
75 gboolean volume_set:1;
78 guint32 current_sink_idx;
79 gchar *current_sink_name;
83 gint notify; /* atomic */
87 #ifdef PCM_DUMP_ENABLE
91 #endif /* __TIZEN__ */
93 const gchar *pa_version;
95 GstStructure *properties;
96 pa_proplist *proplist;
98 volatile gint format_lost;
99 GstClockTime format_lost_time;
102 struct _GstPulseSinkClass
104 GstAudioBaseSinkClass parent_class;
107 GType gst_pulsesink_get_type (void);
109 #define PULSE_SINK_TEMPLATE_CAPS \
119 #endif /* __GST_PULSESINK_H__ */