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

@ -65,7 +65,7 @@ device_added (PinosGstManager *manager,
PinosGstManagerPrivate *priv = manager->priv;
gchar *name, *klass;
GstElement *element;
PinosNode *node;
PinosNode *node = NULL;
GstStructure *p;
PinosProperties *properties;
GstCaps *caps;
@ -91,24 +91,24 @@ device_added (PinosGstManager *manager,
"gstreamer.device.class",
klass);
node = pinos_node_new (priv->daemon);
g_object_set_data (G_OBJECT (device), "PinosNode", node);
element = gst_device_create_element (device, NULL);
if (strstr (klass, "Source")) {
pinos_gst_source_new (node,
name,
properties,
element,
caps);
node = pinos_gst_source_new (priv->daemon,
name,
properties,
element,
caps);
} else if (strstr (klass, "Sink")) {
pinos_gst_sink_new (node,
name,
properties,
element,
caps);
node = pinos_gst_sink_new (priv->daemon,
name,
properties,
element,
caps);
}
if (node)
g_object_set_data (G_OBJECT (device), "PinosNode", node);
pinos_properties_free (properties);
gst_caps_unref (caps);