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_PULSESRC_H__
25 #define __GST_PULSESRC_H__
28 #include <gst/audio/gstaudiosrc.h>
30 #include <pulse/pulseaudio.h>
31 #include <pulse/thread-mainloop.h>
34 #ifdef PCM_DUMP_ENABLE
41 #define GST_TYPE_PULSESRC \
42 (gst_pulsesrc_get_type())
43 #define GST_PULSESRC(obj) \
44 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PULSESRC,GstPulseSrc))
45 #define GST_PULSESRC_CLASS(klass) \
46 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PULSESRC,GstPulseSrcClass))
47 #define GST_IS_PULSESRC(obj) \
48 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PULSESRC))
49 #define GST_IS_PULSESRC_CLASS(obj) \
50 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PULSESRC))
51 #define GST_PULSESRC_CAST(obj) \
52 ((GstPulseSrc *)(obj))
54 typedef struct _GstPulseSrc GstPulseSrc;
55 typedef struct _GstPulseSrcClass GstPulseSrcClass;
61 gchar *server, *device, *client_name;
63 pa_threaded_mainloop *mainloop;
67 guint32 source_output_idx;
69 pa_sample_spec sample_spec;
71 const void *read_buffer;
72 size_t read_buffer_length;
74 gchar *device_description;
77 gboolean volume_set:1;
80 guint32 current_source_idx;
81 gchar *current_source_name;
83 gint notify; /* atomic */
86 gboolean stream_connected:1;
87 gboolean operation_success:1;
93 #endif /* __TIZEN__ */
95 GstStructure *properties;
96 pa_proplist *proplist;
99 #ifdef PCM_DUMP_ENABLE
100 gint need_dump_output;
101 FILE *dump_fd_output;
106 struct _GstPulseSrcClass
108 GstAudioSrcClass parent_class;
111 GType gst_pulsesrc_get_type (void);
115 #endif /* __GST_PULSESRC_H__ */