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__
32 #include <gst/audio/audio.h>
33 #include <gst/audio/gstaudiosink.h>
35 #include <pulse/pulseaudio.h>
36 #include <pulse/thread-mainloop.h>
38 #include "pulseutil.h"
42 #define GST_TYPE_PULSESINK \
43 (gst_pulsesink_get_type())
44 #define GST_PULSESINK(obj) \
45 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PULSESINK,GstPulseSink))
46 #define GST_PULSESINK_CLASS(klass) \
47 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PULSESINK,GstPulseSinkClass))
48 #define GST_IS_PULSESINK(obj) \
49 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PULSESINK))
50 #define GST_IS_PULSESINK_CLASS(obj) \
51 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PULSESINK))
52 #define GST_PULSESINK_CAST(obj) \
53 ((GstPulseSink *)(obj))
55 typedef struct _GstPulseSink GstPulseSink;
56 typedef struct _GstPulseSinkClass GstPulseSinkClass;
58 typedef struct _GstPulseDeviceInfo {
65 GstAudioBaseSink sink;
67 gchar *server, *device, *stream_name, *client_name;
68 GstPulseDeviceInfo device_info;
71 gboolean volume_set:1;
74 guint32 current_sink_idx;
75 gchar *current_sink_name;
79 gint notify; /* atomic */
81 const gchar *pa_version;
83 GstStructure *properties;
84 pa_proplist *proplist;
86 volatile gint format_lost;
87 GstClockTime format_lost_time;
90 struct _GstPulseSinkClass
92 GstAudioBaseSinkClass parent_class;
95 GType gst_pulsesink_get_type (void);
97 #define PULSE_SINK_TEMPLATE_CAPS \
107 #endif /* __GST_PULSESINK_H__ */