GstPulseRingBuffer *pbuf;
uint32_t idx;
+ if (!psink->mainloop)
+ goto no_mainloop;
+
pa_threaded_mainloop_lock (psink->mainloop);
GST_DEBUG_OBJECT (psink, "setting volume to %f", volume);
return;
/* ERRORS */
+no_mainloop:
+ {
+ psink->volume = volume;
+ psink->volume_set = TRUE;
+
+ GST_DEBUG_OBJECT (psink, "we have no mainloop");
+ return;
+ }
no_buffer:
{
psink->volume = volume;
GstPulseRingBuffer *pbuf;
uint32_t idx;
+ if (!psink->mainloop)
+ goto no_mainloop;
+
pa_threaded_mainloop_lock (psink->mainloop);
GST_DEBUG_OBJECT (psink, "setting mute state to %d", mute);
return;
/* ERRORS */
+no_mainloop:
+ {
+ psink->mute = mute;
+ psink->mute_set = TRUE;
+
+ GST_DEBUG_OBJECT (psink, "we have no mainloop");
+ return;
+ }
no_buffer:
{
psink->mute = mute;
gdouble v = DEFAULT_VOLUME;
uint32_t idx;
+ if (!psink->mainloop)
+ goto no_mainloop;
+
pa_threaded_mainloop_lock (psink->mainloop);
pbuf = GST_PULSERING_BUFFER_CAST (GST_BASE_AUDIO_SINK (psink)->ringbuffer);
goto unlock;
}
+unlock:
v = psink->volume;
-unlock:
if (o)
pa_operation_unref (o);
return v;
/* ERRORS */
+no_mainloop:
+ {
+ v = psink->volume;
+ GST_DEBUG_OBJECT (psink, "we have no mainloop");
+ return v;
+ }
no_buffer:
{
GST_DEBUG_OBJECT (psink, "we have no ringbuffer");
uint32_t idx;
gboolean mute = FALSE;
+ if (!psink->mainloop)
+ goto no_mainloop;
+
pa_threaded_mainloop_lock (psink->mainloop);
mute = psink->mute;
return mute;
/* ERRORS */
+no_mainloop:
+ {
+ mute = psink->mute;
+ GST_DEBUG_OBJECT (psink, "we have no mainloop");
+ return mute;
+ }
no_buffer:
{
GST_DEBUG_OBJECT (psink, "we have no ringbuffer");
pa_operation *o = NULL;
gchar *t;
+ if (!psink->mainloop)
+ goto no_mainloop;
+
pa_threaded_mainloop_lock (psink->mainloop);
pbuf = GST_PULSERING_BUFFER_CAST (GST_BASE_AUDIO_SINK (psink)->ringbuffer);
if (pbuf == NULL || pbuf->stream == NULL)
return t;
/* ERRORS */
+no_mainloop:
+ {
+ GST_DEBUG_OBJECT (psink, "we have no mainloop");
+ return NULL;
+ }
no_buffer:
{
GST_DEBUG_OBJECT (psink, "we have no ringbuffer");