pbuf->context = NULL;
pbuf->stream = NULL;
-#if HAVE_PULSE_0_9_13
+#ifdef HAVE_PULSE_0_9_13
pa_sample_spec_init (&pbuf->sample_spec);
#else
pbuf->sample_spec.format = PA_SAMPLE_INVALID;
/* Make sure we don't get any further callbacks */
pa_context_set_state_callback (pbuf->context, NULL, NULL);
-#if HAVE_PULSE_0_9_12
+#ifdef HAVE_PULSE_0_9_12
pa_context_set_subscribe_callback (pbuf->context, NULL, NULL);
#endif
}
}
-#if HAVE_PULSE_0_9_12
+#ifdef HAVE_PULSE_0_9_12
static void
gst_pulsering_context_subscribe_cb (pa_context * c,
pa_subscription_event_type_t t, uint32_t idx, void *userdata)
/* register some essential callbacks */
pa_context_set_state_callback (pbuf->context,
gst_pulsering_context_state_cb, pbuf);
-#if HAVE_PULSE_0_9_12
+#ifdef HAVE_PULSE_0_9_12
pa_context_set_subscribe_callback (pbuf->context,
gst_pulsering_context_subscribe_cb, pbuf);
#endif
GST_LOG_OBJECT (psink, "latency update (information unknown)");
return;
}
-#if HAVE_PULSE_0_9_11
+#ifdef HAVE_PULSE_0_9_11
sink_usec = info->configured_sink_usec;
#else
sink_usec = 0;
GST_DEBUG_OBJECT (psink, "stream resumed");
}
-#if HAVE_PULSE_0_9_11
+#ifdef HAVE_PULSE_0_9_11
static void
gst_pulsering_stream_started_cb (pa_stream * p, void *userdata)
{
}
#endif
-#if HAVE_PULSE_0_9_15
+#ifdef HAVE_PULSE_0_9_15
static void
gst_pulsering_stream_event_cb (pa_stream * p, const char *name,
pa_proplist * pl, void *userdata)
const pa_buffer_attr *actual;
pa_channel_map channel_map;
pa_operation *o = NULL;
-#if HAVE_PULSE_0_9_20
+#ifdef HAVE_PULSE_0_9_20
pa_cvolume v;
#endif
pa_cvolume *pv = NULL;
gst_pulsering_stream_latency_cb, pbuf);
pa_stream_set_suspended_callback (pbuf->stream,
gst_pulsering_stream_suspended_cb, pbuf);
-#if HAVE_PULSE_0_9_11
+#ifdef HAVE_PULSE_0_9_11
pa_stream_set_started_callback (pbuf->stream,
gst_pulsering_stream_started_cb, pbuf);
#endif
-#if HAVE_PULSE_0_9_15
+#ifdef HAVE_PULSE_0_9_15
pa_stream_set_event_callback (pbuf->stream,
gst_pulsering_stream_event_cb, pbuf);
#endif
GST_INFO_OBJECT (psink, "prebuf: %d", wanted.prebuf);
GST_INFO_OBJECT (psink, "minreq: %d", wanted.minreq);
-#if HAVE_PULSE_0_9_20
+#ifdef HAVE_PULSE_0_9_20
/* configure volume when we changed it, else we leave the default */
if (psink->volume_set) {
GST_LOG_OBJECT (psink, "have volume of %f", psink->volume);
/* construct the flags */
flags = PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_AUTO_TIMING_UPDATE |
-#if HAVE_PULSE_0_9_11
+#ifdef HAVE_PULSE_0_9_11
PA_STREAM_ADJUST_LATENCY |
#endif
PA_STREAM_START_CORKED;
-#if HAVE_PULSE_0_9_12
+#ifdef HAVE_PULSE_0_9_12
if (psink->mute_set && psink->mute)
flags |= PA_STREAM_START_MUTED;
#endif
NULL,
NULL,
};
-#if HAVE_PULSE_0_9_12
+#ifdef HAVE_PULSE_0_9_12
static const GInterfaceInfo svol_iface_info = {
NULL, NULL, NULL
};
"width = (int) 32, "
"depth = (int) 32, "
"rate = (int) [ 1, MAX ], " "channels = (int) [ 1, 32 ];"
-#if HAVE_PULSE_0_9_15
+#ifdef HAVE_PULSE_0_9_15
"audio/x-raw-int, "
"endianness = (int) { " ENDIANNESS " }, "
"signed = (boolean) TRUE, "
"Human-readable name of the sound device", DEFAULT_DEVICE_NAME,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
-#if HAVE_PULSE_0_9_12
+#ifdef HAVE_PULSE_0_9_12
g_object_class_install_property (gobject_class,
PROP_VOLUME,
g_param_spec_double ("volume", "Volume",
G_OBJECT_CLASS (parent_class)->finalize (object);
}
-#if HAVE_PULSE_0_9_12
+#ifdef HAVE_PULSE_0_9_12
static void
gst_pulsesink_set_volume (GstPulseSink * psink, gdouble volume)
{
g_free (pulsesink->device);
pulsesink->device = g_value_dup_string (value);
break;
-#if HAVE_PULSE_0_9_12
+#ifdef HAVE_PULSE_0_9_12
case PROP_VOLUME:
gst_pulsesink_set_volume (pulsesink, g_value_get_double (value));
break;
case PROP_DEVICE_NAME:
g_value_take_string (value, gst_pulsesink_device_description (pulsesink));
break;
-#if HAVE_PULSE_0_9_12
+#ifdef HAVE_PULSE_0_9_12
case PROP_VOLUME:
g_value_set_double (value, gst_pulsesink_get_volume (pulsesink));
break;
}
}
-#if HAVE_PULSE_0_9_11
+#ifdef HAVE_PULSE_0_9_11
static void
gst_pulsesink_change_props (GstPulseSink * psink, GstTagList * l)
{
g_free (description);
g_free (buf);
-#if HAVE_PULSE_0_9_11
+#ifdef HAVE_PULSE_0_9_11
gst_pulsesink_change_props (pulsesink, l);
#endif