Remove direction

Direction is tied to the port id.
Handle nodes with fixed ports.
This commit is contained in:
Wim Taymans 2016-08-29 18:31:53 +02:00
parent 7d8e2d53f7
commit 9485bd77e7
25 changed files with 246 additions and 165 deletions

View file

@ -31,7 +31,6 @@
typedef struct {
PinosGstSink *sink;
guint id;
PinosPort *port;
GstElement *src;
@ -384,7 +383,6 @@ free_sink_port_data (SinkPortData *data)
static PinosPort *
add_port (PinosNode *node,
PinosDirection direction,
guint id,
GError **error)
{
@ -394,9 +392,8 @@ add_port (PinosNode *node,
data = g_slice_new0 (SinkPortData);
data->sink = sink;
data->id = id;
data->port = PINOS_NODE_CLASS (pinos_gst_sink_parent_class)
->add_port (node, direction, id, error);
->add_port (node, id, error);
g_debug ("connecting signals");
g_signal_connect (data->port, "activate", (GCallback) on_activate, data);
@ -422,7 +419,7 @@ add_port (PinosNode *node,
static gboolean
remove_port (PinosNode *node,
guint id)
PinosPort *port)
{
PinosGstSink *sink = PINOS_GST_SINK (node);
PinosGstSinkPrivate *priv = sink->priv;
@ -431,7 +428,7 @@ remove_port (PinosNode *node,
for (walk = priv->ports; walk; walk = g_list_next (walk)) {
SinkPortData *data = walk->data;
if (data->id == id) {
if (data->port == port) {
free_sink_port_data (data);
priv->ports = g_list_delete_link (priv->ports, walk);
break;