mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-26 07:00:13 -05:00
remove READY state on context
Now that we don't need to register anymore to the daemon we can just remove this state.
This commit is contained in:
parent
5f10a933a1
commit
89f8f41045
7 changed files with 16 additions and 22 deletions
|
|
@ -384,8 +384,7 @@ on_daemon_connected (GObject *source_object,
|
|||
{
|
||||
PinosContext *context = user_data;
|
||||
|
||||
context_set_state (context, PINOS_CONTEXT_STATE_REGISTERING, NULL);
|
||||
context_set_state (context, PINOS_CONTEXT_STATE_READY, NULL);
|
||||
context_set_state (context, PINOS_CONTEXT_STATE_CONNECTED, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -646,7 +645,7 @@ on_node_proxy (GObject *source_object,
|
|||
PinosContext *context = g_task_get_source_object (task);
|
||||
GError *error = NULL;
|
||||
GDBusProxy *proxy;
|
||||
PinosNode *node;
|
||||
PinosClientNode *node;
|
||||
|
||||
proxy = pinos_subscribe_get_proxy_finish (context->priv->subscribe,
|
||||
res,
|
||||
|
|
|
|||
|
|
@ -60,11 +60,10 @@ typedef enum {
|
|||
|
||||
/**
|
||||
* PinosContextState:
|
||||
* @PINOS_CONTEXT_STATE_ERROR: context is in error
|
||||
* @PINOS_CONTEXT_STATE_UNCONNECTED: not connected
|
||||
* @PINOS_CONTEXT_STATE_CONNECTING: connecting to daemon
|
||||
* @PINOS_CONTEXT_STATE_REGISTERING: registering with daemon
|
||||
* @PINOS_CONTEXT_STATE_READY: context is ready
|
||||
* @PINOS_CONTEXT_STATE_ERROR: context is in error
|
||||
* @PINOS_CONTEXT_STATE_CONNECTED: context is connected and ready
|
||||
*
|
||||
* The state of a #PinosContext
|
||||
*/
|
||||
|
|
@ -72,8 +71,7 @@ typedef enum {
|
|||
PINOS_CONTEXT_STATE_ERROR = -1,
|
||||
PINOS_CONTEXT_STATE_UNCONNECTED = 0,
|
||||
PINOS_CONTEXT_STATE_CONNECTING = 1,
|
||||
PINOS_CONTEXT_STATE_REGISTERING = 2,
|
||||
PINOS_CONTEXT_STATE_READY = 3,
|
||||
PINOS_CONTEXT_STATE_CONNECTED = 2,
|
||||
} PinosContextState;
|
||||
|
||||
const gchar * pinos_context_state_as_string (PinosContextState state);
|
||||
|
|
|
|||
|
|
@ -616,7 +616,7 @@ pinos_stream_connect (PinosStream *stream,
|
|||
|
||||
priv = stream->priv;
|
||||
context = priv->context;
|
||||
g_return_val_if_fail (pinos_context_get_state (context) == PINOS_CONTEXT_STATE_READY, FALSE);
|
||||
g_return_val_if_fail (pinos_context_get_state (context) == PINOS_CONTEXT_STATE_CONNECTED, FALSE);
|
||||
g_return_val_if_fail (pinos_stream_get_state (stream) == PINOS_STREAM_STATE_UNCONNECTED, FALSE);
|
||||
|
||||
priv->direction = direction;
|
||||
|
|
@ -681,7 +681,7 @@ pinos_stream_connect_provide (PinosStream *stream,
|
|||
|
||||
priv = stream->priv;
|
||||
context = priv->context;
|
||||
g_return_val_if_fail (pinos_context_get_state (context) == PINOS_CONTEXT_STATE_READY, FALSE);
|
||||
g_return_val_if_fail (pinos_context_get_state (context) == PINOS_CONTEXT_STATE_CONNECTED, FALSE);
|
||||
|
||||
if (priv->possible_formats)
|
||||
g_bytes_unref (priv->possible_formats);
|
||||
|
|
@ -810,7 +810,7 @@ pinos_stream_disconnect (PinosStream *stream)
|
|||
g_return_val_if_fail (priv->state >= PINOS_STREAM_STATE_READY, FALSE);
|
||||
g_return_val_if_fail (priv->node != NULL, FALSE);
|
||||
context = priv->context;
|
||||
g_return_val_if_fail (pinos_context_get_state (context) >= PINOS_CONTEXT_STATE_READY, FALSE);
|
||||
g_return_val_if_fail (pinos_context_get_state (context) >= PINOS_CONTEXT_STATE_CONNECTED, FALSE);
|
||||
g_return_val_if_fail (!priv->disconnecting, FALSE);
|
||||
|
||||
priv->disconnecting = TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue