mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-18 07:00:06 -05:00
Remove direction
Direction is tied to the port id. Handle nodes with fixed ports.
This commit is contained in:
parent
7d8e2d53f7
commit
9485bd77e7
25 changed files with 246 additions and 165 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue