PipeWire
0.3.34
|
Data Structures | |
struct | spa_rectangle |
struct | spa_point |
struct | spa_region |
struct | spa_fraction |
struct | spa_dict_item |
struct | spa_dict |
struct | spa_list |
struct | spa_ringbuffer |
A ringbuffer type. More... | |
Macros | |
#define | SPA_ANSI_RESET "\x1B[0m" |
Ansi escape sequences. More... | |
#define | SPA_ANSI_BOLD "\x1B[1m" |
#define | SPA_ANSI_ITALIC "\x1B[3m" |
#define | SPA_ANSI_UNDERLINE "\x1B[4m" |
#define | SPA_ANSI_BLACK "\x1B[0;30m" |
#define | SPA_ANSI_RED "\x1B[0;31m" |
#define | SPA_ANSI_GREEN "\x1B[0;32m" |
#define | SPA_ANSI_YELLOW "\x1B[0;33m" |
#define | SPA_ANSI_BLUE "\x1B[0;34m" |
#define | SPA_ANSI_MAGENTA "\x1B[0;35m" |
#define | SPA_ANSI_CYAN "\x1B[0;36m" |
#define | SPA_ANSI_WHITE "\x1B[0;37m" |
#define | SPA_ANSI_BRIGHT_BLACK "\x1B[90m" |
#define | SPA_ANSI_BRIGHT_RED "\x1B[91m" |
#define | SPA_ANSI_BRIGHT_GREEN "\x1B[92m" |
#define | SPA_ANSI_BRIGHT_YELLOW "\x1B[93m" |
#define | SPA_ANSI_BRIGHT_BLUE "\x1B[94m" |
#define | SPA_ANSI_BRIGHT_MAGENTA "\x1B[95m" |
#define | SPA_ANSI_BRIGHT_CYAN "\x1B[96m" |
#define | SPA_ANSI_BRIGHT_WHITE "\x1B[97m" |
#define | SPA_ANSI_BOLD_BLACK "\x1B[1;30m" |
#define | SPA_ANSI_BOLD_RED "\x1B[1;31m" |
#define | SPA_ANSI_BOLD_GREEN "\x1B[1;32m" |
#define | SPA_ANSI_BOLD_YELLOW "\x1B[1;33m" |
#define | SPA_ANSI_BOLD_BLUE "\x1B[1;34m" |
#define | SPA_ANSI_BOLD_MAGENTA "\x1B[1;35m" |
#define | SPA_ANSI_BOLD_CYAN "\x1B[1;36m" |
#define | SPA_ANSI_BOLD_WHITE "\x1B[1;37m" |
#define | SPA_ANSI_DARK_BLACK "\x1B[2;30m" |
#define | SPA_ANSI_DARK_RED "\x1B[2;31m" |
#define | SPA_ANSI_DARK_GREEN "\x1B[2;32m" |
#define | SPA_ANSI_DARK_YELLOW "\x1B[2;33m" |
#define | SPA_ANSI_DARK_BLUE "\x1B[2;34m" |
#define | SPA_ANSI_DARK_MAGENTA "\x1B[2;35m" |
#define | SPA_ANSI_DARK_CYAN "\x1B[2;36m" |
#define | SPA_ANSI_DARK_WHITE "\x1B[2;37m" |
#define | SPA_ANSI_BG_BLACK "\x1B[0;40m" |
#define | SPA_ANSI_BG_RED "\x1B[0;41m" |
#define | SPA_ANSI_BG_GREEN "\x1B[0;42m" |
#define | SPA_ANSI_BG_YELLOW "\x1B[0;43m" |
#define | SPA_ANSI_BG_BLUE "\x1B[0;44m" |
#define | SPA_ANSI_BG_MAGENTA "\x1B[0;45m" |
#define | SPA_ANSI_BG_CYAN "\x1B[0;46m" |
#define | SPA_ANSI_BG_WHITE "\x1B[0;47m" |
#define | SPA_ANSI_BG_BRIGHT_BLACK "\x1B[100m" |
#define | SPA_ANSI_BG_BRIGHT_RED "\x1B[101m" |
#define | SPA_ANSI_BG_BRIGHT_GREEN "\x1B[102m" |
#define | SPA_ANSI_BG_BRIGHT_YELLOW "\x1B[103m" |
#define | SPA_ANSI_BG_BRIGHT_BLUE "\x1B[104m" |
#define | SPA_ANSI_BG_BRIGHT_MAGENTA "\x1B[105m" |
#define | SPA_ANSI_BG_BRIGHT_CYAN "\x1B[106m" |
#define | SPA_ANSI_BG_BRIGHT_WHITE "\x1B[107m" |
#define | SPA_FALLTHROUGH /* FALLTHROUGH */ |
SPA_FALLTHROUGH is an annotation to suppress compiler warnings about switch cases that fall through without a break or return statement. More... | |
#define | SPA_FLAG_MASK(field, mask, flag) (((field) & (mask)) == (flag)) |
#define | SPA_FLAG_IS_SET(field, flag) SPA_FLAG_MASK(field,flag,flag) |
#define | SPA_FLAG_SET(field, flag) ((field) |= (flag)) |
#define | SPA_FLAG_CLEAR(field, flag) ((field) &= ~(flag)) |
#define | SPA_FLAG_UPDATE(field, flag, val) ((val) ? SPA_FLAG_SET(field,flag) : SPA_FLAG_CLEAR(field,flag)) |
#define | SPA_DIRECTION_REVERSE(d) ((d) ^ 1) |
#define | SPA_RECTANGLE(width, height) (struct spa_rectangle){ width, height } |
#define | SPA_POINT(x, y) (struct spa_point){ x, y } |
#define | SPA_REGION(x, y, width, height) (struct spa_region){ SPA_POINT(x,y), SPA_RECTANGLE(width,height) } |
#define | SPA_FRACTION(num, denom) (struct spa_fraction){ num, denom } |
#define | SPA_N_ELEMENTS(arr) (sizeof(arr) / sizeof((arr)[0])) |
#define | SPA_FOR_EACH_ELEMENT(arr, ptr) for (ptr = arr; (void*)ptr < SPA_PTROFF(arr, sizeof(arr), void); ptr++) |
Array iterator macro. More... | |
#define | SPA_MIN(a, b) |
#define | SPA_MAX(a, b) |
#define | SPA_CLAMP(v, low, high) |
#define | SPA_SWAP(a, b) |
#define | SPA_TYPECHECK(type, x) |
#define | SPA_PTROFF(ptr_, offset_, type_) ((type_*)((uint8_t*)(ptr_) + (int)(offset_))) |
Return the address (buffer + offset) as pointer of type. More... | |
#define | SPA_PTROFF_ALIGN(ptr_, offset_, alignment_, type_) SPA_PTR_ALIGN(SPA_PTROFF(ptr_,offset_,type_),alignment_,type_) |
#define | SPA_MEMBER(b, o, t) SPA_PTROFF(b,o,t) |
Deprecated, use SPA_PTROFF and SPA_PTROFF_ALIGN instead. More... | |
#define | SPA_MEMBER_ALIGN(b, o, a, t) SPA_PTROFF_ALIGN(b,o,a,t) |
#define | SPA_CONTAINER_OF(p, t, m) (t*)((uint8_t*)p - offsetof (t,m)) |
#define | SPA_PTRDIFF(p1, p2) ((uint8_t*)(p1) - (uint8_t*)(p2)) |
#define | SPA_PTR_TO_INT(p) ((int) ((intptr_t) (p))) |
#define | SPA_INT_TO_PTR(u) ((void*) ((intptr_t) (u))) |
#define | SPA_PTR_TO_UINT32(p) ((uint32_t) ((uintptr_t) (p))) |
#define | SPA_UINT32_TO_PTR(u) ((void*) ((uintptr_t) (u))) |
#define | SPA_TIME_INVALID ((int64_t)INT64_MIN) |
#define | SPA_IDX_INVALID ((unsigned int)-1) |
#define | SPA_ID_INVALID ((uint32_t)0xffffffff) |
#define | SPA_NSEC_PER_SEC (1000000000ll) |
#define | SPA_NSEC_PER_MSEC (1000000ll) |
#define | SPA_NSEC_PER_USEC (1000ll) |
#define | SPA_USEC_PER_SEC (1000000ll) |
#define | SPA_USEC_PER_MSEC (1000ll) |
#define | SPA_MSEC_PER_SEC (1000ll) |
#define | SPA_TIMESPEC_TO_NSEC(ts) ((ts)->tv_sec * SPA_NSEC_PER_SEC + (ts)->tv_nsec) |
#define | SPA_TIMESPEC_TO_USEC(ts) ((ts)->tv_sec * SPA_USEC_PER_SEC + (ts)->tv_nsec / SPA_NSEC_PER_USEC) |
#define | SPA_TIMEVAL_TO_NSEC(tv) ((tv)->tv_sec * SPA_NSEC_PER_SEC + (tv)->tv_usec * SPA_NSEC_PER_USEC) |
#define | SPA_TIMEVAL_TO_USEC(tv) ((tv)->tv_sec * SPA_USEC_PER_SEC + (tv)->tv_usec) |
#define | SPA_PRINTF_FUNC(fmt, arg1) |
#define | SPA_ALIGNED(align) |
#define | SPA_DEPRECATED |
#define | SPA_EXPORT |
#define | SPA_SENTINEL |
#define | SPA_UNUSED |
#define | SPA_NORETURN |
#define | SPA_RESTRICT |
#define | SPA_ROUND_DOWN_N(num, align) ((num) & ~((align) - 1)) |
#define | SPA_ROUND_UP_N(num, align) SPA_ROUND_DOWN_N((num) + ((align) - 1),align) |
#define | SPA_PTR_ALIGNMENT(p, align) ((intptr_t)(p) & ((align)-1)) |
#define | SPA_IS_ALIGNED(p, align) (SPA_PTR_ALIGNMENT(p,align) == 0) |
#define | SPA_PTR_ALIGN(p, align, type) (type*)SPA_ROUND_UP_N((intptr_t)(p), (intptr_t)(align)) |
#define | SPA_LIKELY(x) (x) |
#define | SPA_UNLIKELY(x) (x) |
#define | SPA_STRINGIFY_1(...) #__VA_ARGS__ |
#define | SPA_STRINGIFY(...) SPA_STRINGIFY_1(__VA_ARGS__) |
#define | spa_return_if_fail(expr) |
#define | spa_return_val_if_fail(expr, val) |
#define | spa_assert_se(expr) |
#define | spa_nop() do {} while (false) |
#define | spa_assert(expr) spa_assert_se(expr) |
#define | spa_assert_not_reached() |
#define | spa_memzero(x, l) (memset((x), 0, (l))) |
#define | spa_zero(x) (spa_memzero(&(x), sizeof(x))) |
#define | spa_memcpy(d, s, n) memcpy(d,s,n) |
#define | spa_memmove(d, s, n) memmove(d,s,n) |
#define | spa_aprintf(_fmt, ...) |
#define | SPA_DICT_ITEM_INIT(key, value) (struct spa_dict_item) { key, value } |
#define | SPA_DICT_INIT(items, n_items) (struct spa_dict) { 0, n_items, items } |
#define | SPA_DICT_INIT_ARRAY(items) (struct spa_dict) { 0, SPA_N_ELEMENTS(items), items } |
#define | spa_dict_for_each(item, dict) |
#define | SPA_LIST_INIT(list) (struct spa_list){ list, list } |
#define | spa_list_is_empty(l) ((l)->next == (l)) |
#define | spa_list_first(head, type, member) SPA_CONTAINER_OF((head)->next, type, member) |
#define | spa_list_last(head, type, member) SPA_CONTAINER_OF((head)->prev, type, member) |
#define | spa_list_append(list, item) spa_list_insert((list)->prev, item) |
#define | spa_list_prepend(list, item) spa_list_insert(list, item) |
#define | spa_list_is_end(pos, head, member) (&(pos)->member == (head)) |
#define | spa_list_next(pos, member) SPA_CONTAINER_OF((pos)->member.next, __typeof__(*pos), member) |
#define | spa_list_prev(pos, member) SPA_CONTAINER_OF((pos)->member.prev, __typeof__(*pos), member) |
#define | spa_list_consume(pos, head, member) |
#define | spa_list_for_each_next(pos, head, curr, member) |
#define | spa_list_for_each_prev(pos, head, curr, member) |
#define | spa_list_for_each(pos, head, member) spa_list_for_each_next(pos, head, head, member) |
#define | spa_list_for_each_reverse(pos, head, member) spa_list_for_each_prev(pos, head, head, member) |
#define | spa_list_for_each_safe_next(pos, tmp, head, curr, member) |
#define | spa_list_for_each_safe_prev(pos, tmp, head, curr, member) |
#define | spa_list_for_each_safe(pos, tmp, head, member) spa_list_for_each_safe_next(pos, tmp, head, head, member) |
#define | spa_list_for_each_safe_reverse(pos, tmp, head, member) spa_list_for_each_safe_prev(pos, tmp, head, head, member) |
#define | spa_list_cursor_start(cursor, head, member) spa_list_prepend(head, &(cursor).member) |
#define | spa_list_for_each_cursor(pos, cursor, head, member) |
#define | spa_list_cursor_end(cursor, member) spa_list_remove(&(cursor).member) |
#define | SPA_ASYNC_BIT (1 << 30) |
#define | SPA_ASYNC_SEQ_MASK (SPA_ASYNC_BIT - 1) |
#define | SPA_ASYNC_MASK (~SPA_ASYNC_SEQ_MASK) |
#define | SPA_RESULT_IS_OK(res) ((res) >= 0) |
#define | SPA_RESULT_IS_ERROR(res) ((res) < 0) |
#define | SPA_RESULT_IS_ASYNC(res) (((res) & SPA_ASYNC_MASK) == SPA_ASYNC_BIT) |
#define | SPA_RESULT_ASYNC_SEQ(res) ((res) & SPA_ASYNC_SEQ_MASK) |
#define | SPA_RESULT_RETURN_ASYNC(seq) (SPA_ASYNC_BIT | SPA_RESULT_ASYNC_SEQ(seq)) |
#define | spa_strerror(err) |
#define | SPA_RINGBUFFER_INIT() (struct spa_ringbuffer) { 0, 0 } |
Enumerations | |
enum | spa_direction { SPA_DIRECTION_INPUT = 0, SPA_DIRECTION_OUTPUT = 1 } |
Functions | |
int | spa_dict_item_compare (const void *i1, const void *i2) |
void | spa_dict_qsort (struct spa_dict *dict) |
const struct spa_dict_item * | spa_dict_lookup_item (const struct spa_dict *dict, const char *key) |
const char * | spa_dict_lookup (const struct spa_dict *dict, const char *key) |
void | spa_list_init (struct spa_list *list) |
void | spa_list_insert (struct spa_list *list, struct spa_list *elem) |
void | spa_list_insert_list (struct spa_list *list, struct spa_list *other) |
void | spa_list_remove (struct spa_list *elem) |
void | spa_ringbuffer_init (struct spa_ringbuffer *rbuf) |
Initialize a spa_ringbuffer with size. More... | |
void | spa_ringbuffer_set_avail (struct spa_ringbuffer *rbuf, uint32_t size) |
Sets the pointers so that the ringbuffer contains size bytes. More... | |
int32_t | spa_ringbuffer_get_read_index (struct spa_ringbuffer *rbuf, uint32_t *index) |
Get the read index and available bytes for reading. More... | |
void | spa_ringbuffer_read_data (struct spa_ringbuffer *rbuf, const void *buffer, uint32_t size, uint32_t offset, void *data, uint32_t len) |
Read len bytes from rbuf starting offset. More... | |
void | spa_ringbuffer_read_update (struct spa_ringbuffer *rbuf, int32_t index) |
Update the read pointer to index. More... | |
int32_t | spa_ringbuffer_get_write_index (struct spa_ringbuffer *rbuf, uint32_t *index) |
Get the write index and the number of bytes inside the ringbuffer. More... | |
void | spa_ringbuffer_write_data (struct spa_ringbuffer *rbuf, void *buffer, uint32_t size, uint32_t offset, const void *data, uint32_t len) |
Write len bytes to buffer starting offset. More... | |
void | spa_ringbuffer_write_update (struct spa_ringbuffer *rbuf, int32_t index) |
Update the write pointer to index. More... | |
bool | spa_streq (const char *s1, const char *s2) |
bool | spa_strneq (const char *s1, const char *s2, size_t len) |
bool | spa_strstartswith (const char *s, const char *prefix) |
bool | spa_strendswith (const char *s, const char *suffix) |
bool | spa_atoi32 (const char *str, int32_t *val, int base) |
Convert str to an int32_t with the given base and store the result in val. More... | |
bool | spa_atou32 (const char *str, uint32_t *val, int base) |
Convert str to an uint32_t with the given base and store the result in val. More... | |
bool | spa_atoi64 (const char *str, int64_t *val, int base) |
Convert str to an int64_t with the given base and store the result in val. More... | |
bool | spa_atou64 (const char *str, uint64_t *val, int base) |
Convert str to an uint64_t with the given base and store the result in val. More... | |
bool | spa_atob (const char *str) |
Convert str to a boolean. More... | |
int | spa_vscnprintf (char *buffer, size_t size, const char *format, va_list args) |
int | spa_scnprintf (char *buffer, size_t size, const char *format,...) |
bool | spa_atof (const char *str, float *val) |
Convert str to a float and store the result in val. More... | |
bool | spa_atod (const char *str, double *val) |
Convert str to a double and store the result in val. More... | |
#define SPA_ALIGNED | ( | align | ) |
#define SPA_ANSI_BG_BLACK "\x1B[0;40m" |
#define SPA_ANSI_BG_BLUE "\x1B[0;44m" |
#define SPA_ANSI_BG_BRIGHT_BLACK "\x1B[100m" |
#define SPA_ANSI_BG_BRIGHT_BLUE "\x1B[104m" |
#define SPA_ANSI_BG_BRIGHT_CYAN "\x1B[106m" |
#define SPA_ANSI_BG_BRIGHT_GREEN "\x1B[102m" |
#define SPA_ANSI_BG_BRIGHT_MAGENTA "\x1B[105m" |
#define SPA_ANSI_BG_BRIGHT_RED "\x1B[101m" |
#define SPA_ANSI_BG_BRIGHT_WHITE "\x1B[107m" |
#define SPA_ANSI_BG_BRIGHT_YELLOW "\x1B[103m" |
#define SPA_ANSI_BG_CYAN "\x1B[0;46m" |
#define SPA_ANSI_BG_GREEN "\x1B[0;42m" |
#define SPA_ANSI_BG_MAGENTA "\x1B[0;45m" |
#define SPA_ANSI_BG_RED "\x1B[0;41m" |
#define SPA_ANSI_BG_WHITE "\x1B[0;47m" |
#define SPA_ANSI_BG_YELLOW "\x1B[0;43m" |
#define SPA_ANSI_BLACK "\x1B[0;30m" |
#define SPA_ANSI_BLUE "\x1B[0;34m" |
#define SPA_ANSI_BOLD "\x1B[1m" |
#define SPA_ANSI_BOLD_BLACK "\x1B[1;30m" |
#define SPA_ANSI_BOLD_BLUE "\x1B[1;34m" |
#define SPA_ANSI_BOLD_CYAN "\x1B[1;36m" |
#define SPA_ANSI_BOLD_GREEN "\x1B[1;32m" |
#define SPA_ANSI_BOLD_MAGENTA "\x1B[1;35m" |
#define SPA_ANSI_BOLD_RED "\x1B[1;31m" |
#define SPA_ANSI_BOLD_WHITE "\x1B[1;37m" |
#define SPA_ANSI_BOLD_YELLOW "\x1B[1;33m" |
#define SPA_ANSI_BRIGHT_BLACK "\x1B[90m" |
#define SPA_ANSI_BRIGHT_BLUE "\x1B[94m" |
#define SPA_ANSI_BRIGHT_CYAN "\x1B[96m" |
#define SPA_ANSI_BRIGHT_GREEN "\x1B[92m" |
#define SPA_ANSI_BRIGHT_MAGENTA "\x1B[95m" |
#define SPA_ANSI_BRIGHT_RED "\x1B[91m" |
#define SPA_ANSI_BRIGHT_WHITE "\x1B[97m" |
#define SPA_ANSI_BRIGHT_YELLOW "\x1B[93m" |
#define SPA_ANSI_CYAN "\x1B[0;36m" |
#define SPA_ANSI_DARK_BLACK "\x1B[2;30m" |
#define SPA_ANSI_DARK_BLUE "\x1B[2;34m" |
#define SPA_ANSI_DARK_CYAN "\x1B[2;36m" |
#define SPA_ANSI_DARK_GREEN "\x1B[2;32m" |
#define SPA_ANSI_DARK_MAGENTA "\x1B[2;35m" |
#define SPA_ANSI_DARK_RED "\x1B[2;31m" |
#define SPA_ANSI_DARK_WHITE "\x1B[2;37m" |
#define SPA_ANSI_DARK_YELLOW "\x1B[2;33m" |
#define SPA_ANSI_GREEN "\x1B[0;32m" |
#define SPA_ANSI_ITALIC "\x1B[3m" |
#define SPA_ANSI_MAGENTA "\x1B[0;35m" |
#define SPA_ANSI_RED "\x1B[0;31m" |
#define SPA_ANSI_RESET "\x1B[0m" |
Ansi escape sequences.
Note that the color names are approximate only and the actual rendering of the color depends on the terminal.
#define SPA_ANSI_UNDERLINE "\x1B[4m" |
#define SPA_ANSI_WHITE "\x1B[0;37m" |
#define SPA_ANSI_YELLOW "\x1B[0;33m" |
#define spa_aprintf | ( | _fmt, | |
... | |||
) |
Referenced by pw_context_find_format().
#define spa_assert | ( | expr | ) | spa_assert_se(expr) |
#define spa_assert_not_reached | ( | ) |
#define spa_assert_se | ( | expr | ) |
Referenced by spa_strendswith(), spa_strstartswith(), and spa_vscnprintf().
#define SPA_ASYNC_BIT (1 << 30) |
#define SPA_ASYNC_MASK (~SPA_ASYNC_SEQ_MASK) |
#define SPA_ASYNC_SEQ_MASK (SPA_ASYNC_BIT - 1) |
#define SPA_CLAMP | ( | v, | |
low, | |||
high | |||
) |
#define SPA_CONTAINER_OF | ( | p, | |
t, | |||
m | |||
) | (t*)((uint8_t*)p - offsetof (t,m)) |
Referenced by pw_context_destroy(), pw_context_recalc_graph(), pw_control_add_link(), pw_control_destroy(), pw_filter_add_listener(), pw_filter_add_port(), pw_filter_connect(), pw_filter_dequeue_buffer(), pw_filter_destroy(), pw_filter_disconnect(), pw_filter_flush(), pw_filter_get_dsp_buffer(), pw_filter_get_properties(), pw_filter_get_time(), pw_filter_queue_buffer(), pw_filter_remove_port(), pw_filter_update_params(), pw_filter_update_properties(), pw_impl_client_destroy(), pw_impl_device_destroy(), pw_impl_device_for_each_param(), pw_impl_link_activate(), pw_impl_link_deactivate(), pw_impl_link_destroy(), pw_impl_link_prepare(), pw_impl_metadata_destroy(), pw_impl_metadata_set_implementation(), pw_impl_module_destroy(), pw_impl_node_destroy(), pw_impl_node_for_each_param(), pw_impl_node_set_driver(), pw_impl_node_set_state(), pw_impl_port_destroy(), pw_impl_port_for_each_param(), pw_impl_port_set_mix(), pw_loop_destroy(), pw_memblock_free(), pw_memblock_map(), pw_memmap_free(), pw_mempool_add_listener(), pw_mempool_alloc(), pw_mempool_clear(), pw_mempool_destroy(), pw_mempool_find_id(), pw_mempool_find_ptr(), pw_mempool_find_tag(), pw_mempool_import(), pw_mempool_import_map(), pw_mempool_map_id(), pw_mempool_remove_id(), pw_properties_clear(), pw_properties_free(), pw_properties_get(), pw_properties_iterate(), pw_properties_update_string(), pw_protocol_destroy(), pw_stream_add_listener(), pw_stream_connect(), pw_stream_dequeue_buffer(), pw_stream_destroy(), pw_stream_disconnect(), pw_stream_flush(), pw_stream_get_time(), pw_stream_is_driving(), pw_stream_queue_buffer(), pw_stream_set_active(), pw_stream_set_control(), pw_stream_trigger_process(), pw_stream_update_params(), pw_stream_update_properties(), sm_media_session_add_listener(), sm_media_session_create_links(), sm_media_session_create_node(), sm_media_session_create_object(), sm_media_session_destroy_object(), sm_media_session_export(), sm_media_session_export_device(), sm_media_session_export_node(), sm_media_session_find_object(), sm_media_session_for_each_object(), sm_media_session_remove_links(), sm_media_session_roundtrip(), sm_media_session_schedule_rescan(), sm_media_session_seat_active_changed(), and sm_media_session_sync().
#define SPA_DEPRECATED |
#define spa_dict_for_each | ( | item, | |
dict | |||
) |
Referenced by pw_properties_serialize_dict(), pw_properties_update(), pw_properties_update_ignore(), spa_debug_dict(), and spa_dict_lookup_item().
#define SPA_DICT_INIT | ( | items, | |
n_items | |||
) | (struct spa_dict) { 0, n_items, items } |
Referenced by pw_ngettext().
#define SPA_DICT_INIT_ARRAY | ( | items | ) | (struct spa_dict) { 0, SPA_N_ELEMENTS(items), items } |
Referenced by pipewire__module_init(), and sm_media_session_export_metadata().
#define SPA_DICT_ITEM_INIT | ( | key, | |
value | |||
) | (struct spa_dict_item) { key, value } |
Referenced by pw_ngettext(), sm_media_session_export_metadata(), and spa_dict_lookup_item().
#define SPA_DIRECTION_REVERSE | ( | d | ) | ((d) ^ 1) |
Referenced by pw_impl_port_recalc_latency().
#define SPA_EXPORT |
Referenced by pw_context_add_listener(), pw_context_connect_self(), pw_context_create_core(), pw_context_create_factory(), pw_context_find_spa_lib(), pw_context_get_conf_section(), pw_context_get_default_core(), pw_context_get_main_loop(), pw_context_get_properties(), pw_context_get_support(), pw_context_get_user_data(), pw_context_get_work_queue(), pw_context_load_spa_handle(), pw_context_register_export_type(), pw_control_get_port(), pw_core_get_client(), pw_core_get_context(), pw_core_get_mempool(), pw_core_get_properties(), pw_core_set_paused(), pw_core_steal_fd(), pw_core_update_properties(), pw_data_loop_destroy(), pw_data_loop_get_loop(), pw_data_loop_in_thread(), pw_data_loop_stop(), pw_data_loop_wait(), pw_direction_as_string(), pw_direction_reverse(), pw_filter_get_core(), pw_filter_get_name(), pw_filter_get_node_id(), pw_filter_get_properties(), pw_filter_get_state(), pw_filter_set_active(), pw_filter_state_as_string(), pw_free_strv(), pw_get_client_name(), pw_get_host_name(), pw_get_library_version(), pw_get_user_name(), pw_gettext(), pw_global_add_listener(), pw_global_add_resource(), pw_global_for_each_resource(), pw_global_get_context(), pw_global_get_id(), pw_global_get_object(), pw_global_get_permissions(), pw_global_get_properties(), pw_global_get_type(), pw_global_get_version(), pw_global_is_type(), pw_global_update_keys(), pw_global_update_permissions(), pw_impl_client_add_listener(), pw_impl_client_get_context(), pw_impl_client_get_core_resource(), pw_impl_client_get_global(), pw_impl_client_get_info(), pw_impl_client_get_properties(), pw_impl_client_get_protocol(), pw_impl_client_set_busy(), pw_impl_core_get_global(), pw_impl_core_get_properties(), pw_impl_core_get_user_data(), pw_impl_core_update_properties(), pw_impl_device_get_global(), pw_impl_device_get_implementation(), pw_impl_device_get_properties(), pw_impl_device_get_user_data(), pw_impl_device_set_implementation(), pw_impl_factory_add_listener(), pw_impl_factory_get_global(), pw_impl_factory_get_info(), pw_impl_factory_get_properties(), pw_impl_factory_get_user_data(), pw_impl_factory_set_implementation(), pw_impl_factory_update_properties(), pw_impl_link_find(), pw_impl_link_get_context(), pw_impl_link_get_global(), pw_impl_link_get_info(), pw_impl_link_get_output(), pw_impl_link_get_user_data(), pw_impl_metadata_add_listener(), pw_impl_metadata_get_global(), pw_impl_metadata_get_implementation(), pw_impl_metadata_get_user_data(), pw_impl_metadata_set_property(), pw_impl_module_destroy(), pw_impl_module_get_context(), pw_impl_module_get_global(), pw_impl_module_get_info(), pw_impl_module_get_properties(), pw_impl_module_update_properties(), pw_impl_node_add_listener(), pw_impl_node_get_context(), pw_impl_node_get_global(), pw_impl_node_get_implementation(), pw_impl_node_get_info(), pw_impl_node_get_user_data(), pw_impl_node_set_active(), pw_impl_node_set_param(), pw_impl_port_add_listener(), pw_impl_port_get_direction(), pw_impl_port_get_id(), pw_impl_port_get_info(), pw_impl_port_get_node(), pw_impl_port_get_properties(), pw_impl_port_is_linked(), pw_impl_port_recalc_latency(), pw_log_is_default(), pw_log_log(), pw_log_set_level(), pw_loop_new(), pw_main_loop_add_listener(), pw_main_loop_destroy(), pw_main_loop_get_loop(), pw_main_loop_quit(), pw_mempool_add_listener(), pw_mempool_find_ptr(), pw_mempool_import_block(), pw_ngettext(), pw_node_state_as_string(), pw_properties_add(), pw_properties_add_keys(), pw_properties_copy(), pw_properties_setf(), pw_properties_update(), pw_properties_update_string(), pw_protocol_add_listener(), pw_protocol_add_marshal(), pw_protocol_destroy(), pw_protocol_get_context(), pw_protocol_get_extension(), pw_protocol_get_implementation(), pw_protocol_get_marshal(), pw_protocol_get_user_data(), pw_protocol_new(), pw_proxy_add_listener(), pw_proxy_error(), pw_proxy_get_bound_id(), pw_proxy_get_core(), pw_proxy_get_id(), pw_proxy_get_object_listeners(), pw_proxy_get_protocol(), pw_proxy_get_type(), pw_proxy_get_user_data(), pw_proxy_install_marshal(), pw_proxy_new(), pw_proxy_ref(), pw_proxy_set_bound_id(), pw_proxy_sync(), pw_proxy_unref(), pw_resource_add_listener(), pw_resource_add_object_listener(), pw_resource_error(), pw_resource_errorf(), pw_resource_errorf_id(), pw_resource_get_bound_id(), pw_resource_get_client(), pw_resource_get_id(), pw_resource_get_marshal(), pw_resource_get_object_listeners(), pw_resource_get_permissions(), pw_resource_get_protocol(), pw_resource_get_type(), pw_resource_get_user_data(), pw_resource_install_marshal(), pw_resource_ping(), pw_resource_set_bound_id(), pw_split_walk(), pw_stream_disconnect(), pw_stream_get_name(), pw_stream_get_node_id(), pw_stream_get_properties(), pw_stream_get_state(), pw_stream_set_active(), pw_stream_state_as_string(), pw_stream_update_properties(), pw_thread_loop_accept(), pw_thread_loop_add_listener(), pw_thread_loop_destroy(), pw_thread_loop_get_time(), pw_thread_loop_lock(), pw_thread_loop_signal(), pw_thread_loop_stop(), pw_thread_loop_timed_wait(), pw_thread_loop_timed_wait_full(), pw_thread_loop_unlock(), pw_thread_loop_wait(), pw_thread_utils_set(), pw_work_queue_add(), pw_work_queue_cancel(), and pw_work_queue_destroy().
#define SPA_FALLTHROUGH /* FALLTHROUGH */ |
SPA_FALLTHROUGH is an annotation to suppress compiler warnings about switch cases that fall through without a break or return statement.
SPA_FALLTHROUGH is only needed on cases that have code:
switch (foo) { case 1: // These cases have no code. No fallthrough annotations are needed. case 2: case 3: foo = 4; // This case has code, so a fallthrough annotation is needed: SPA_FALLTHROUGH; default: return foo; }
Referenced by spa_json_next(), and spa_pod_builder_addv().
#define SPA_FLAG_CLEAR | ( | field, | |
flag | |||
) | ((field) &= ~(flag)) |
Referenced by spa_pod_builder_child(), and spa_pod_builder_primitive().
#define SPA_FLAG_IS_SET | ( | field, | |
flag | |||
) | SPA_FLAG_MASK(field,flag,flag) |
#define SPA_FLAG_MASK | ( | field, | |
mask, | |||
flag | |||
) | (((field) & (mask)) == (flag)) |
#define SPA_FLAG_SET | ( | field, | |
flag | |||
) | ((field) |= (flag)) |
Referenced by spa_dict_qsort(), and spa_format_audio_raw_parse().
#define SPA_FLAG_UPDATE | ( | field, | |
flag, | |||
val | |||
) | ((val) ? SPA_FLAG_SET(field,flag) : SPA_FLAG_CLEAR(field,flag)) |
#define SPA_FOR_EACH_ELEMENT | ( | arr, | |
ptr | |||
) | for (ptr = arr; (void*)ptr < SPA_PTROFF(arr, sizeof(arr), void); ptr++) |
Array iterator macro.
Usage:
#define SPA_FRACTION | ( | num, | |
denom | |||
) | (struct spa_fraction){ num, denom } |
Referenced by spa_pod_builder_fraction().
#define SPA_ID_INVALID ((uint32_t)0xffffffff) |
#define SPA_IDX_INVALID ((unsigned int)-1) |
#define SPA_INT_TO_PTR | ( | u | ) | ((void*) ((intptr_t) (u))) |
Referenced by pw_properties_iterate().
#define SPA_IS_ALIGNED | ( | p, | |
align | |||
) | (SPA_PTR_ALIGNMENT(p,align) == 0) |
#define SPA_LIKELY | ( | x | ) | (x) |
Referenced by spa_i18n_ntext(), spa_i18n_text(), spa_streq(), spa_strneq(), and spa_vscnprintf().
#define spa_list_append | ( | list, | |
item | |||
) | spa_list_insert((list)->prev, item) |
Referenced by pw_context_register_export_type(), pw_control_new(), pw_global_add_resource(), pw_global_register(), pw_impl_node_set_driver(), pw_protocol_add_marshal(), pw_protocol_new(), pw_work_queue_add(), sm_media_session_sync(), spa_graph_link_add(), spa_graph_node_add(), spa_graph_port_add(), spa_graph_run(), and spa_hook_list_append().
#define spa_list_consume | ( | pos, | |
head, | |||
member | |||
) |
Referenced by pw_context_destroy(), pw_control_destroy(), pw_filter_destroy(), pw_global_destroy(), pw_impl_device_destroy(), pw_impl_port_destroy(), pw_mempool_clear(), pw_protocol_destroy(), and spa_hook_list_clean().
#define spa_list_cursor_end | ( | cursor, | |
member | |||
) | spa_list_remove(&(cursor).member) |
#define spa_list_cursor_start | ( | cursor, | |
head, | |||
member | |||
) | spa_list_prepend(head, &(cursor).member) |
#define spa_list_first | ( | head, | |
type, | |||
member | |||
) | SPA_CONTAINER_OF((head)->next, type, member) |
Referenced by pw_work_queue_add().
#define spa_list_for_each | ( | pos, | |
head, | |||
member | |||
) | spa_list_for_each_next(pos, head, head, member) |
Referenced by pw_context_find_export_type(), pw_context_find_factory(), pw_context_find_port(), pw_context_find_protocol(), pw_global_register(), pw_global_update_permissions(), pw_impl_client_update_permissions(), pw_impl_core_update_properties(), pw_impl_factory_update_properties(), pw_impl_link_find(), pw_impl_module_update_properties(), pw_impl_port_recalc_latency(), pw_impl_port_set_mix(), pw_mempool_find_ptr(), pw_mempool_find_tag(), pw_protocol_get_marshal(), pw_work_queue_cancel(), pw_work_queue_complete(), sm_media_session_add_listener(), sm_media_session_for_each_object(), spa_graph_node_trigger(), and spa_graph_run().
#define spa_list_for_each_cursor | ( | pos, | |
cursor, | |||
head, | |||
member | |||
) |
#define spa_list_for_each_next | ( | pos, | |
head, | |||
curr, | |||
member | |||
) |
#define spa_list_for_each_prev | ( | pos, | |
head, | |||
curr, | |||
member | |||
) |
#define spa_list_for_each_reverse | ( | pos, | |
head, | |||
member | |||
) | spa_list_for_each_prev(pos, head, head, member) |
#define spa_list_for_each_safe | ( | pos, | |
tmp, | |||
head, | |||
member | |||
) | spa_list_for_each_safe_next(pos, tmp, head, head, member) |
#define spa_list_for_each_safe_next | ( | pos, | |
tmp, | |||
head, | |||
curr, | |||
member | |||
) |
#define spa_list_for_each_safe_prev | ( | pos, | |
tmp, | |||
head, | |||
curr, | |||
member | |||
) |
#define spa_list_for_each_safe_reverse | ( | pos, | |
tmp, | |||
head, | |||
member | |||
) | spa_list_for_each_safe_prev(pos, tmp, head, head, member) |
#define SPA_LIST_INIT | ( | list | ) | (struct spa_list){ list, list } |
Referenced by spa_list_init().
#define spa_list_is_empty | ( | l | ) | ((l)->next == (l)) |
#define spa_list_is_end | ( | pos, | |
head, | |||
member | |||
) | (&(pos)->member == (head)) |
#define spa_list_last | ( | head, | |
type, | |||
member | |||
) | SPA_CONTAINER_OF((head)->prev, type, member) |
#define spa_list_next | ( | pos, | |
member | |||
) | SPA_CONTAINER_OF((pos)->member.next, __typeof__(*pos), member) |
#define spa_list_prepend | ( | list, | |
item | |||
) | spa_list_insert(list, item) |
Referenced by spa_hook_list_prepend().
#define spa_list_prev | ( | pos, | |
member | |||
) | SPA_CONTAINER_OF((pos)->member.prev, __typeof__(*pos), member) |
#define SPA_MAX | ( | a, | |
b | |||
) |
Referenced by pw_control_add_link(), and spa_buffer_alloc_fill_info().
#define SPA_MEMBER | ( | b, | |
o, | |||
t | |||
) | SPA_PTROFF(b,o,t) |
Deprecated, use SPA_PTROFF and SPA_PTROFF_ALIGN instead.
#define SPA_MEMBER_ALIGN | ( | b, | |
o, | |||
a, | |||
t | |||
) | SPA_PTROFF_ALIGN(b,o,a,t) |
#define spa_memcpy | ( | d, | |
s, | |||
n | |||
) | memcpy(d,s,n) |
Referenced by spa_ringbuffer_read_data(), and spa_ringbuffer_write_data().
#define spa_memmove | ( | d, | |
s, | |||
n | |||
) | memmove(d,s,n) |
#define spa_memzero | ( | x, | |
l | |||
) | (memset((x), 0, (l))) |
#define SPA_MIN | ( | a, | |
b | |||
) |
Referenced by pw_get_support(), spa_pod_copy_array(), spa_pod_get_values(), spa_ringbuffer_read_data(), and spa_ringbuffer_write_data().
#define SPA_MSEC_PER_SEC (1000ll) |
#define SPA_N_ELEMENTS | ( | arr | ) | (sizeof(arr) / sizeof((arr)[0])) |
#define spa_nop | ( | ) | do {} while (false) |
#define SPA_NORETURN |
#define SPA_NSEC_PER_MSEC (1000000ll) |
#define SPA_NSEC_PER_SEC (1000000000ll) |
Referenced by pw_stream_get_time(), pw_thread_loop_get_time(), and pw_thread_loop_timed_wait().
#define SPA_NSEC_PER_USEC (1000ll) |
#define SPA_POINT | ( | x, | |
y | |||
) | (struct spa_point){ x, y } |
#define SPA_PRINTF_FUNC | ( | fmt, | |
arg1 | |||
) |
Referenced by pw_resource_get_bound_id(), spa_atob(), and spa_vscnprintf().
#define SPA_PTR_ALIGN | ( | p, | |
align, | |||
type | |||
) | (type*)SPA_ROUND_UP_N((intptr_t)(p), (intptr_t)(align)) |
Referenced by spa_buffer_alloc_array(), and spa_buffer_alloc_layout().
#define SPA_PTR_ALIGNMENT | ( | p, | |
align | |||
) | ((intptr_t)(p) & ((align)-1)) |
#define SPA_PTR_TO_INT | ( | p | ) | ((int) ((intptr_t) (p))) |
Referenced by pw_properties_iterate().
#define SPA_PTR_TO_UINT32 | ( | p | ) | ((uint32_t) ((uintptr_t) (p))) |
#define SPA_PTRDIFF | ( | p1, | |
p2 | |||
) | ((uint8_t*)(p1) - (uint8_t*)(p2)) |
#define SPA_PTROFF | ( | ptr_, | |
offset_, | |||
type_ | |||
) | ((type_*)((uint8_t*)(ptr_) + (int)(offset_))) |
Return the address (buffer + offset) as pointer of type.
Referenced by pw_context_create_core(), pw_context_create_device(), pw_context_create_factory(), pw_context_create_node(), pw_context_create_port(), pw_context_new(), pw_control_new(), pw_mempool_add_listener(), pw_mempool_find_ptr(), pw_protocol_new(), pw_proxy_new(), spa_buffer_alloc_array(), spa_buffer_alloc_layout(), spa_buffer_alloc_layout_array(), spa_debug_format(), spa_pod_builder_deref(), spa_pod_builder_frame(), spa_pod_builder_raw(), spa_pod_choice_fix_default(), spa_pod_control_first(), spa_pod_control_is_inside(), spa_pod_control_next(), spa_pod_filter_part(), spa_pod_filter_prop(), spa_pod_from_data(), spa_pod_is_inside(), spa_pod_next(), spa_pod_parser_deref(), spa_pod_parser_frame(), spa_pod_prop_first(), spa_pod_prop_is_inside(), spa_pod_prop_next(), spa_result_func_device_params(), spa_result_func_node_params(), spa_ringbuffer_read_data(), and spa_ringbuffer_write_data().
#define SPA_PTROFF_ALIGN | ( | ptr_, | |
offset_, | |||
alignment_, | |||
type_ | |||
) | SPA_PTR_ALIGN(SPA_PTROFF(ptr_,offset_,type_),alignment_,type_) |
#define SPA_RECTANGLE | ( | width, | |
height | |||
) | (struct spa_rectangle){ width, height } |
Referenced by spa_pod_builder_rectangle().
#define SPA_REGION | ( | x, | |
y, | |||
width, | |||
height | |||
) | (struct spa_region){ SPA_POINT(x,y), SPA_RECTANGLE(width,height) } |
#define SPA_RESTRICT |
#define SPA_RESULT_ASYNC_SEQ | ( | res | ) | ((res) & SPA_ASYNC_SEQ_MASK) |
Referenced by pw_work_queue_add().
#define SPA_RESULT_IS_ASYNC | ( | res | ) | (((res) & SPA_ASYNC_MASK) == SPA_ASYNC_BIT) |
Referenced by pw_work_queue_add().
#define SPA_RESULT_IS_ERROR | ( | res | ) | ((res) < 0) |
#define SPA_RESULT_IS_OK | ( | res | ) | ((res) >= 0) |
#define SPA_RESULT_RETURN_ASYNC | ( | seq | ) | (SPA_ASYNC_BIT | SPA_RESULT_ASYNC_SEQ(seq)) |
#define spa_return_if_fail | ( | expr | ) |
Referenced by pw_memblock_free().
#define spa_return_val_if_fail | ( | expr, | |
val | |||
) |
Referenced by spa_pod_compare(), spa_pod_filter(), spa_pod_get_array(), and spa_pod_get_fraction().
#define SPA_RINGBUFFER_INIT | ( | ) | (struct spa_ringbuffer) { 0, 0 } |
Referenced by spa_ringbuffer_init().
#define SPA_ROUND_DOWN_N | ( | num, | |
align | |||
) | ((num) & ~((align) - 1)) |
#define SPA_ROUND_UP_N | ( | num, | |
align | |||
) | SPA_ROUND_DOWN_N((num) + ((align) - 1),align) |
#define SPA_SENTINEL |
#define spa_strerror | ( | err | ) |
Referenced by pw_context_debug_port_params(), pw_context_find_format(), pw_core_export(), pw_global_bind(), pw_impl_port_set_param(), pw_loop_new(), pw_main_loop_run(), sm_alsa_monitor_start(), sm_bluez5_autoswitch_start(), sm_bluez5_monitor_start(), sm_default_nodes_start(), sm_default_profile_start(), sm_default_routes_start(), sm_restore_stream_start(), and sm_v4l2_monitor_start().
#define SPA_STRINGIFY | ( | ... | ) | SPA_STRINGIFY_1(__VA_ARGS__) |
#define SPA_STRINGIFY_1 | ( | ... | ) | #__VA_ARGS__ |
#define SPA_SWAP | ( | a, | |
b | |||
) |
Referenced by pw_control_add_link().
#define SPA_TIME_INVALID ((int64_t)INT64_MIN) |
#define SPA_TIMESPEC_TO_NSEC | ( | ts | ) | ((ts)->tv_sec * SPA_NSEC_PER_SEC + (ts)->tv_nsec) |
#define SPA_TIMESPEC_TO_USEC | ( | ts | ) | ((ts)->tv_sec * SPA_USEC_PER_SEC + (ts)->tv_nsec / SPA_NSEC_PER_USEC) |
#define SPA_TIMEVAL_TO_NSEC | ( | tv | ) | ((tv)->tv_sec * SPA_NSEC_PER_SEC + (tv)->tv_usec * SPA_NSEC_PER_USEC) |
#define SPA_TIMEVAL_TO_USEC | ( | tv | ) | ((tv)->tv_sec * SPA_USEC_PER_SEC + (tv)->tv_usec) |
#define SPA_TYPECHECK | ( | type, | |
x | |||
) |
#define SPA_UINT32_TO_PTR | ( | u | ) | ((void*) ((uintptr_t) (u))) |
#define SPA_UNLIKELY | ( | x | ) | (x) |
#define SPA_UNUSED |
#define SPA_USEC_PER_MSEC (1000ll) |
#define SPA_USEC_PER_SEC (1000000ll) |
#define spa_zero | ( | x | ) | (spa_memzero(&(x), sizeof(x))) |
Referenced by spa_hook_list_append(), spa_hook_list_prepend(), spa_latency_parse(), and spa_process_latency_parse().
enum spa_direction |
|
inline |
Convert str to a boolean.
Allowed boolean values are "true" and a literal "1", anything else is false.
References SPA_PRINTF_FUNC, and spa_streq().
Referenced by get_pending_save().
|
inline |
Convert str to a double and store the result in val.
On failure, the value of val is unmodified.
|
inline |
Convert str to a float and store the result in val.
On failure, the value of val is unmodified.
|
inline |
Convert str to an int32_t with the given base and store the result in val.
On failure, the value of val is unmodified.
|
inline |
Convert str to an int64_t with the given base and store the result in val.
On failure, the value of val is unmodified.
|
inline |
Convert str to an uint32_t with the given base and store the result in val.
On failure, the value of val is unmodified.
|
inline |
Convert str to an uint64_t with the given base and store the result in val.
On failure, the value of val is unmodified.
|
inline |
References spa_dict_item::key.
Referenced by spa_dict_qsort().
|
inline |
const struct spa_dict_item* spa_dict_lookup_item | ( | const struct spa_dict * | dict, |
const char * | key | ||
) |
References spa_dict::flags, spa_dict::items, spa_dict_item::key, spa_dict::n_items, SPA_DICT_FLAG_SORTED, spa_dict_for_each, SPA_DICT_ITEM_INIT, and SPA_FLAG_IS_SET.
Referenced by spa_dict_lookup().
|
inline |
References spa_dict::flags, spa_dict::items, spa_dict::n_items, SPA_DICT_FLAG_SORTED, spa_dict_item_compare(), and SPA_FLAG_SET.
|
inline |
References SPA_LIST_INIT.
Referenced by pipewire__module_init(), pw_context_create_device(), pw_context_create_node(), pw_context_create_port(), pw_control_new(), pw_mempool_alloc(), pw_protocol_new(), sm_access_flatpak_start(), sm_access_portal_start(), sm_alsa_monitor_start(), sm_bluez5_monitor_start(), sm_libcamera_monitor_start(), sm_policy_ep_start(), sm_suspend_node_start(), sm_v4l2_monitor_start(), spa_graph_init(), spa_graph_node_init(), spa_graph_run(), and spa_hook_list_init().
References spa_list::next, and spa_list::prev.
References spa_list::next, spa_list::prev, and spa_list_is_empty.
Referenced by spa_hook_list_isolate(), and spa_hook_list_join().
|
inline |
References spa_list::next, and spa_list::prev.
Referenced by pw_control_destroy(), pw_control_remove_link(), pw_filter_destroy(), pw_filter_disconnect(), pw_filter_remove_port(), pw_impl_client_destroy(), pw_impl_core_destroy(), pw_impl_factory_destroy(), pw_impl_link_destroy(), pw_impl_metadata_destroy(), pw_impl_module_destroy(), pw_impl_node_set_driver(), pw_memmap_free(), pw_protocol_destroy(), pw_resource_destroy(), pw_stream_destroy(), pw_stream_disconnect(), pw_work_queue_add(), spa_graph_link_remove(), spa_graph_node_remove(), spa_graph_port_remove(), and spa_hook_remove().
|
inline |
Get the read index and available bytes for reading.
rbuf | a spa_ringbuffer |
index | the value of readindex, should be taken modulo the size of the ringbuffer memory to get the offset in the ringbuffer memory |
References spa_ringbuffer::readindex, and spa_ringbuffer::writeindex.
|
inline |
Get the write index and the number of bytes inside the ringbuffer.
rbuf | a spa_ringbuffer |
index | the value of writeindex, should be taken modulo the size of the ringbuffer memory to get the offset in the ringbuffer memory |
References spa_ringbuffer::readindex, and spa_ringbuffer::writeindex.
|
inline |
Initialize a spa_ringbuffer with size.
rbuf | a spa_ringbuffer |
References SPA_RINGBUFFER_INIT.
Referenced by pipewire__module_init().
|
inline |
Read len bytes from rbuf starting offset.
offset must be taken modulo size and len should be smaller than size.
rbuf | a struct spa_ringbuffer |
buffer | memory to read from |
size | the size of buffer |
offset | offset in buffer to read from |
data | destination memory |
len | number of bytes to read |
References spa_memcpy, SPA_MIN, SPA_PTROFF, and SPA_UNLIKELY.
|
inline |
Update the read pointer to index.
rbuf | a spa_ringbuffer |
index | new index |
References spa_ringbuffer::readindex.
|
inline |
Sets the pointers so that the ringbuffer contains size bytes.
rbuf | a spa_ringbuffer |
size | the target size of rbuf |
References spa_ringbuffer::readindex, and spa_ringbuffer::writeindex.
|
inline |
Write len bytes to buffer starting offset.
offset must be taken modulo size and len should be smaller than size.
rbuf | a spa_ringbuffer |
buffer | memory to write to |
size | the size of buffer |
offset | offset in buffer to write to |
data | source memory |
len | number of bytes to write |
References spa_memcpy, SPA_MIN, SPA_PTROFF, and SPA_UNLIKELY.
|
inline |
Update the write pointer to index.
rbuf | a spa_ringbuffer |
index | new index |
References spa_ringbuffer::writeindex.
|
inline |
References spa_vscnprintf().
Referenced by get_pending_save(), get_saved_headset_profile(), get_saved_profile(), set_pending_save(), set_saved_headset_profile(), and set_saved_profile().
|
inline |
References spa_assert_se, spa_streq(), and SPA_UNLIKELY.
|
inline |
If both a and b are NULL, the two are considered equal.
References SPA_LIKELY.
Referenced by pipewire__module_init(), pw_check_option(), pw_context_find_export_type(), pw_context_find_factory(), pw_context_find_protocol(), pw_context_parse_conf_section(), pw_global_is_type(), pw_ngettext(), pw_protocol_get_marshal(), sm_media_session_match_rules(), spa_atob(), and spa_strendswith().
|
inline |
If both a and b are NULL, the two are considered equal.
References SPA_LIKELY.
|
inline |
References spa_assert_se, and SPA_UNLIKELY.
|
inline |
References spa_assert_se, SPA_LIKELY, SPA_PRINTF_FUNC, and SPA_UNLIKELY.
Referenced by spa_scnprintf().