mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-16 07:00:00 -05:00
spa: add SPA_IO_AsyncBuffers
This structure has 2 io_buffers. Readers and writers operate on different io_buffers to implement an asynchronous transfer.
This commit is contained in:
parent
84ed9c0fe9
commit
e8ac4e6a34
3 changed files with 9 additions and 0 deletions
|
|
@ -40,6 +40,7 @@ enum spa_io_type {
|
|||
SPA_IO_Position, /**< position information in the graph, struct spa_io_position */
|
||||
SPA_IO_RateMatch, /**< rate matching between nodes, struct spa_io_rate_match */
|
||||
SPA_IO_Memory, /**< memory pointer, struct spa_io_memory (currently not used in PipeWire) */
|
||||
SPA_IO_AsyncBuffers, /**< async area to exchange buffers, struct spa_io_async_buffers */
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -307,6 +308,12 @@ struct spa_io_rate_match {
|
|||
uint32_t padding[7];
|
||||
};
|
||||
|
||||
/** async buffers */
|
||||
struct spa_io_async_buffers {
|
||||
struct spa_io_buffers buffers[2]; /**< async buffers, writers write to current (cycle+1)&1,
|
||||
* readers read from (cycle)&1 */
|
||||
};
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ static const struct spa_type_info spa_type_io[] = {
|
|||
{ SPA_IO_Position, SPA_TYPE_Int, SPA_TYPE_INFO_IO_BASE "Position", NULL },
|
||||
{ SPA_IO_RateMatch, SPA_TYPE_Int, SPA_TYPE_INFO_IO_BASE "RateMatch", NULL },
|
||||
{ SPA_IO_Memory, SPA_TYPE_Int, SPA_TYPE_INFO_IO_BASE "Memory", NULL },
|
||||
{ SPA_IO_AsyncBuffers, SPA_TYPE_Int, SPA_TYPE_INFO_IO_BASE "AsyncBuffers", NULL },
|
||||
{ 0, 0, NULL, NULL },
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue