Introduce the concept of a Port

A port is an input or output on a Node.
Channels are created from the ports and inherit the direction of the
port.
do automatic port selection based on the direction and caps and
node/port name.
Simplify stream_connect by passing the direction.
Fix pinossink to connect in setcaps so that we know the format and can
select a good sink to connect to.
This commit is contained in:
Wim Taymans 2016-05-06 13:01:52 +02:00
parent b885d40390
commit ba4ef9b5d9
35 changed files with 1939 additions and 2120 deletions

View file

@ -147,8 +147,8 @@ pinos_context_finalize (GObject * object)
if (priv->properties)
pinos_properties_free (priv->properties);
g_list_free (priv->sources);
g_list_free (priv->sinks);
g_list_free (priv->nodes);
g_list_free (priv->ports);
g_list_free (priv->clients);
g_list_free (priv->channels);
g_clear_object (&priv->subscribe);
@ -488,18 +488,18 @@ subscription_cb (PinosSubscribe *subscribe,
}
break;
case PINOS_SUBSCRIPTION_FLAG_SOURCE:
case PINOS_SUBSCRIPTION_FLAG_NODE:
if (event == PINOS_SUBSCRIPTION_EVENT_NEW)
priv->sources = g_list_prepend (priv->sources, object);
priv->nodes = g_list_prepend (priv->nodes, object);
else if (event == PINOS_SUBSCRIPTION_EVENT_REMOVE)
priv->sources = g_list_remove (priv->sources, object);
priv->nodes = g_list_remove (priv->nodes, object);
break;
case PINOS_SUBSCRIPTION_FLAG_SINK:
case PINOS_SUBSCRIPTION_FLAG_PORT:
if (event == PINOS_SUBSCRIPTION_EVENT_NEW)
priv->sinks = g_list_prepend (priv->sinks, object);
priv->ports = g_list_prepend (priv->ports, object);
else if (event == PINOS_SUBSCRIPTION_EVENT_REMOVE)
priv->sinks = g_list_remove (priv->sinks, object);
priv->ports = g_list_remove (priv->ports, object);
break;
case PINOS_SUBSCRIPTION_FLAG_CHANNEL: