mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
buffer: add DYNAMIC data flag
Add a flag to mark when a buffer data pointer can change. Improve docs for port flags
This commit is contained in:
parent
0505f2dc98
commit
df5c81e3be
2 changed files with 9 additions and 3 deletions
|
|
@ -62,7 +62,8 @@ struct spa_chunk {
|
||||||
struct spa_data {
|
struct spa_data {
|
||||||
uint32_t type; /**< memory type, one of enum spa_data_type */
|
uint32_t type; /**< memory type, one of enum spa_data_type */
|
||||||
#define SPA_DATA_FLAG_NONE 0
|
#define SPA_DATA_FLAG_NONE 0
|
||||||
#define SPA_DATA_FLAG_CORRUPTED (1<<0) /**< data is corrupted in some way */
|
#define SPA_DATA_FLAG_CORRUPTED (1u<<0) /**< data is corrupted in some way */
|
||||||
|
#define SPA_DATA_FLAG_DYNAMIC (1u<<1) /**< data pointer can be changed */
|
||||||
uint32_t flags; /**< data flags */
|
uint32_t flags; /**< data flags */
|
||||||
int64_t fd; /**< optional fd for data */
|
int64_t fd; /**< optional fd for data */
|
||||||
uint32_t mapoffset; /**< offset to map fd at */
|
uint32_t mapoffset; /**< offset to map fd at */
|
||||||
|
|
|
||||||
|
|
@ -85,14 +85,19 @@ struct spa_port_info {
|
||||||
#define SPA_PORT_FLAG_CAN_USE_BUFFERS (1u<<3) /**< the port can use a provided buffer */
|
#define SPA_PORT_FLAG_CAN_USE_BUFFERS (1u<<3) /**< the port can use a provided buffer */
|
||||||
#define SPA_PORT_FLAG_IN_PLACE (1u<<4) /**< the port can process data in-place and
|
#define SPA_PORT_FLAG_IN_PLACE (1u<<4) /**< the port can process data in-place and
|
||||||
* will need a writable input buffer */
|
* will need a writable input buffer */
|
||||||
#define SPA_PORT_FLAG_NO_REF (1u<<5) /**< the port does not keep a ref on the buffer */
|
#define SPA_PORT_FLAG_NO_REF (1u<<5) /**< the port does not keep a ref on the buffer.
|
||||||
|
* This means the node will always completely
|
||||||
|
* consume the input buffer and it will be
|
||||||
|
* recycled after process. */
|
||||||
#define SPA_PORT_FLAG_LIVE (1u<<6) /**< output buffers from this port are
|
#define SPA_PORT_FLAG_LIVE (1u<<6) /**< output buffers from this port are
|
||||||
* timestamped against a live clock. */
|
* timestamped against a live clock. */
|
||||||
#define SPA_PORT_FLAG_PHYSICAL (1u<<7) /**< connects to some device */
|
#define SPA_PORT_FLAG_PHYSICAL (1u<<7) /**< connects to some device */
|
||||||
#define SPA_PORT_FLAG_TERMINAL (1u<<8) /**< data was not created from this port
|
#define SPA_PORT_FLAG_TERMINAL (1u<<8) /**< data was not created from this port
|
||||||
* or will not be made available on another
|
* or will not be made available on another
|
||||||
* port */
|
* port */
|
||||||
#define SPA_PORT_FLAG_DYNAMIC_DATA (1u<<9) /**< data pointer on buffers can be changed */
|
#define SPA_PORT_FLAG_DYNAMIC_DATA (1u<<9) /**< data pointer on buffers can be changed.
|
||||||
|
* Only the buffer data marked as DYNAMIC
|
||||||
|
* can be changed. */
|
||||||
uint64_t flags; /**< port flags */
|
uint64_t flags; /**< port flags */
|
||||||
struct spa_fraction rate; /**< rate of sequence numbers on port */
|
struct spa_fraction rate; /**< rate of sequence numbers on port */
|
||||||
const struct spa_dict *props; /**< extra port properties */
|
const struct spa_dict *props; /**< extra port properties */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue