mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-17 07:00:03 -05:00
Add port direction again
simplify port numbering again by using 0->max_ports for bot input ports and output ports. This means we need to tall what direction the port is. Add port_info serialize functions Copy metadata and data when we are not sharing buffers. Make pinossink work again.
This commit is contained in:
parent
b208e8b690
commit
d828073bb8
26 changed files with 1104 additions and 648 deletions
|
|
@ -273,7 +273,7 @@ alloc_buffers (AppData *data)
|
|||
}
|
||||
data->n_buffers = MAX_BUFFERS;
|
||||
|
||||
spa_node_port_use_buffers (data->source, 0, data->bp, MAX_BUFFERS);
|
||||
spa_node_port_use_buffers (data->source, SPA_DIRECTION_OUTPUT, 0, data->bp, MAX_BUFFERS);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
|
|
@ -320,10 +320,10 @@ negotiate_formats (AppData *data)
|
|||
f.framerate.denom = 1;
|
||||
#endif
|
||||
|
||||
if ((res = spa_node_port_set_format (data->source, 0, false, &f.fmt)) < 0)
|
||||
if ((res = spa_node_port_set_format (data->source, SPA_DIRECTION_OUTPUT, 0, false, &f.fmt)) < 0)
|
||||
return res;
|
||||
|
||||
if ((res = spa_node_port_get_info (data->source, 0, &info)) < 0)
|
||||
if ((res = spa_node_port_get_info (data->source, SPA_DIRECTION_OUTPUT, 0, &info)) < 0)
|
||||
return res;
|
||||
|
||||
spa_debug_port_info (info);
|
||||
|
|
@ -342,7 +342,7 @@ negotiate_formats (AppData *data)
|
|||
return -1;
|
||||
}
|
||||
n_buffers = MAX_BUFFERS;
|
||||
if ((res = spa_node_port_alloc_buffers (data->source, 0, NULL, 0, data->bp, &n_buffers)) < 0) {
|
||||
if ((res = spa_node_port_alloc_buffers (data->source, SPA_DIRECTION_OUTPUT, 0, NULL, 0, data->bp, &n_buffers)) < 0) {
|
||||
printf ("can't allocate buffers: %s\n", SDL_GetError ());
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue