Merge branch 'upstream/1.16' into tizen_gst_1.16.2
[platform/upstream/gst-plugins-good.git] / ext / pulse / pulsesrc.h
index 8c4a03b..60e560d 100644 (file)
@@ -1,3 +1,5 @@
+/*-*- Mode: C; c-basic-offset: 2 -*-*/
+
 /*
  *  GStreamer pulseaudio plugin
  *
@@ -15,7 +17,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public
  *  License along with gst-pulse; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
  *  USA.
  */
 
@@ -28,8 +30,9 @@
 #include <pulse/pulseaudio.h>
 #include <pulse/thread-mainloop.h>
 
-#include "pulsemixerctrl.h"
-#include "pulseprobe.h"
+#if defined(__TIZEN__) && defined(PCM_DUMP_ENABLE)
+#include <stdio.h>
+#endif
 
 G_BEGIN_DECLS
 
@@ -43,6 +46,8 @@ G_BEGIN_DECLS
   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PULSESRC))
 #define GST_IS_PULSESRC_CLASS(obj) \
   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PULSESRC))
+#define GST_PULSESRC_CAST(obj) \
+  ((GstPulseSrc *)(obj))
 
 typedef struct _GstPulseSrc GstPulseSrc;
 typedef struct _GstPulseSrcClass GstPulseSrcClass;
@@ -51,12 +56,13 @@ struct _GstPulseSrc
 {
   GstAudioSrc src;
 
-  gchar *server, *device;
+  gchar *server, *device, *client_name;
 
   pa_threaded_mainloop *mainloop;
 
   pa_context *context;
   pa_stream *stream;
+  guint32 source_output_idx;
 
   pa_sample_spec sample_spec;
 
@@ -65,11 +71,32 @@ struct _GstPulseSrc
 
   gchar *device_description;
 
-  GstPulseMixerCtrl *mixer;
-  GstPulseProbe *probe;
+  gdouble volume;
+  gboolean volume_set:1;
+  gboolean mute:1;
+  gboolean mute_set:1;
+  guint32 current_source_idx;
+  gchar *current_source_name;
+
+  gint notify; /* atomic */
+
+  gboolean corked:1;
+  gboolean stream_connected:1;
+  gboolean operation_success:1;
+  gboolean paused:1;
+  gboolean in_read:1;
+
+#ifdef __TIZEN__
+  gchar *latency;
+#endif /* __TIZEN__ */
+
+  GstStructure *properties;
+  pa_proplist *proplist;
 
-  gboolean operation_success;
-  gboolean did_reset, in_read;
+#if defined(__TIZEN__) && defined(PCM_DUMP_ENABLE)
+  gint need_dump_output;
+  FILE *dump_fd_output;
+#endif
 };
 
 struct _GstPulseSrcClass