port to new API

This commit is contained in:
Wim Taymans 2016-07-25 12:28:21 +02:00
parent fcc9639479
commit f06b991a5a
8 changed files with 201 additions and 149 deletions

View file

@ -851,38 +851,6 @@ pinos_stream_connect (PinosStream *stream,
return TRUE;
}
static void
on_ringbuffer (GObject *source_object,
GAsyncResult *res,
gpointer user_data)
{
PinosStream *stream = user_data;
PinosStreamPrivate *priv = stream->priv;
GError *error = NULL;
g_assert (priv->port == PINOS_PORT (source_object));
priv->ringbuffer = pinos_port_get_ringbuffer_finish (priv->port,
res,
&error);
if (priv->ringbuffer == NULL)
goto no_ringbuffer;
stream_set_state (stream, PINOS_STREAM_STATE_STREAMING, NULL);
g_object_unref (stream);
return;
/* ERRORS */
no_ringbuffer:
{
g_warning ("failed to get ringbuffer: %s", error->message);
stream_set_state (stream, PINOS_STREAM_STATE_ERROR, error);
g_object_unref (stream);
return;
}
}
static gboolean
do_start (PinosStream *stream)
{