mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-14 06:59:57 -05:00
API cleanups
Fix docs Add some more versions to interfaces Make types for the various proxy object + inline methods that does type checking and create proxys etc. Set owner client of client-nodes in the properties Pass type to bind to in create-node Don't place global id in the info structs Improve registration of marshal functions Pass more types around as ids
This commit is contained in:
parent
465f12241e
commit
1acba78234
45 changed files with 963 additions and 764 deletions
|
|
@ -43,8 +43,6 @@ enum spa_clock_state {
|
|||
#include <spa/plugin.h>
|
||||
#include <spa/props.h>
|
||||
|
||||
#define SPA_VERSION_CLOCK 0
|
||||
|
||||
/**
|
||||
* spa_clock:
|
||||
*
|
||||
|
|
@ -53,6 +51,7 @@ enum spa_clock_state {
|
|||
struct spa_clock {
|
||||
/* the version of this clock. This can be used to expand this
|
||||
* structure in the future */
|
||||
#define SPA_VERSION_CLOCK 0
|
||||
uint32_t version;
|
||||
|
||||
const struct spa_dict *info;
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ enum spa_result {
|
|||
SPA_RESULT_SKIPPED = -34,
|
||||
SPA_RESULT_OUT_OF_BUFFERS = -35,
|
||||
SPA_RESULT_INCOMPATIBLE_PROPS = -36,
|
||||
SPA_RESULT_INCOMPATIBLE_VERSION = -37,
|
||||
};
|
||||
|
||||
#define SPA_ASYNC_BIT (1 << 30)
|
||||
|
|
|
|||
|
|
@ -42,8 +42,6 @@ enum spa_log_level {
|
|||
SPA_LOG_LEVEL_TRACE,
|
||||
};
|
||||
|
||||
#define SPA_VERSION_LOG 0
|
||||
|
||||
/**
|
||||
* struct spa_log:
|
||||
*
|
||||
|
|
@ -52,6 +50,7 @@ enum spa_log_level {
|
|||
struct spa_log {
|
||||
/* the version of this log. This can be used to expand this
|
||||
* structure in the future */
|
||||
#define SPA_VERSION_LOG 0
|
||||
uint32_t version;
|
||||
/**
|
||||
* struct spa_log::info
|
||||
|
|
|
|||
|
|
@ -66,8 +66,6 @@ typedef int (*spa_invoke_func_t) (struct spa_loop *loop,
|
|||
void *data,
|
||||
void *user_data);
|
||||
|
||||
#define SPA_VERSION_LOOP 0
|
||||
|
||||
/**
|
||||
* spa_loop:
|
||||
*
|
||||
|
|
@ -76,6 +74,7 @@ typedef int (*spa_invoke_func_t) (struct spa_loop *loop,
|
|||
struct spa_loop {
|
||||
/* the version of this structure. This can be used to expand this
|
||||
* structure in the future */
|
||||
#define SPA_VERSION_LOOP 0
|
||||
uint32_t version;
|
||||
|
||||
int (*add_source) (struct spa_loop *loop,
|
||||
|
|
@ -160,8 +159,6 @@ typedef void (*spa_source_signal_func_t) (struct spa_loop_utils *utils,
|
|||
struct spa_source *source,
|
||||
int signal_number, void *data);
|
||||
|
||||
#define SPA_VERSION_LOOP_UTILS 0
|
||||
|
||||
/**
|
||||
* struct spa_loop_utils:
|
||||
*
|
||||
|
|
@ -170,6 +167,7 @@ typedef void (*spa_source_signal_func_t) (struct spa_loop_utils *utils,
|
|||
struct spa_loop_utils {
|
||||
/* the version of this structure. This can be used to expand this
|
||||
* structure in the future */
|
||||
#define SPA_VERSION_LOOP_UTILS 0
|
||||
uint32_t version;
|
||||
|
||||
struct spa_source *(*add_io) (struct spa_loop_utils *utils,
|
||||
|
|
|
|||
|
|
@ -104,19 +104,17 @@ enum spa_monitor_item_state {
|
|||
SPA_MONITOR_ITEM_STATE_UNAVAILABLE,
|
||||
};
|
||||
|
||||
#define SPA_VERSION_MONITOR_CALLBACKS 0
|
||||
|
||||
/**
|
||||
* spa_monitor_callbacks:
|
||||
*/
|
||||
struct spa_monitor_callbacks {
|
||||
uint32_t version; /**< version of the structure */
|
||||
/** version of the structure */
|
||||
#define SPA_VERSION_MONITOR_CALLBACKS 0
|
||||
uint32_t version;
|
||||
|
||||
void (*event) (struct spa_monitor *monitor, struct spa_event *event, void *user_data);
|
||||
};
|
||||
|
||||
#define SPA_VERSION_MONITOR 0
|
||||
|
||||
/**
|
||||
* spa_monitor:
|
||||
*
|
||||
|
|
@ -125,6 +123,7 @@ struct spa_monitor_callbacks {
|
|||
struct spa_monitor {
|
||||
/* the version of this monitor. This can be used to expand this
|
||||
* structure in the future */
|
||||
#define SPA_VERSION_MONITOR 0
|
||||
uint32_t version;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ struct spa_port_info {
|
|||
const struct spa_dict *props; /**< extra port properties */
|
||||
};
|
||||
|
||||
#define SPA_VERSION_NODE_CALLBACKS 0
|
||||
|
||||
struct spa_node_callbacks {
|
||||
#define SPA_VERSION_NODE_CALLBACKS 0
|
||||
uint32_t version; /**< version of this structure */
|
||||
|
||||
/** Emited when an async operation completed */
|
||||
|
|
@ -134,8 +134,6 @@ struct spa_node_callbacks {
|
|||
|
||||
};
|
||||
|
||||
#define SPA_VERSION_NODE 0
|
||||
|
||||
/**
|
||||
* struct spa_node:
|
||||
*
|
||||
|
|
@ -147,6 +145,7 @@ struct spa_node_callbacks {
|
|||
struct spa_node {
|
||||
/* the version of this node. This can be used to expand this
|
||||
* structure in the future */
|
||||
#define SPA_VERSION_NODE 0
|
||||
uint32_t version;
|
||||
/**
|
||||
* spa_node::info
|
||||
|
|
|
|||
|
|
@ -30,10 +30,9 @@ extern "C" {
|
|||
#define SPA_TYPE__Handle SPA_TYPE_INTERFACE_BASE "Handle"
|
||||
#define SPA_TYPE__HandleFactory SPA_TYPE_INTERFACE_BASE "HandleFactory"
|
||||
|
||||
#define SPA_VERSION_HANDLE 0
|
||||
|
||||
struct spa_handle {
|
||||
/** Version of this struct */
|
||||
#define SPA_VERSION_HANDLE 0
|
||||
uint32_t version;
|
||||
|
||||
/* user_data that can be set by the application */
|
||||
|
|
@ -103,10 +102,9 @@ static inline void *spa_support_find(const struct spa_support *support,
|
|||
|
||||
#define SPA_SUPPORT_INIT(type,data) (struct spa_support) { (type), (data) }
|
||||
|
||||
#define SPA_VERSION_HANDLE_FACTORY 0
|
||||
|
||||
struct spa_handle_factory {
|
||||
/** The version of this structure */
|
||||
#define SPA_VERSION_HANDLE_FACTORY 0
|
||||
uint32_t version;
|
||||
/**
|
||||
* spa_handle_factory::name
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@ extern "C" {
|
|||
|
||||
#define SPA_TYPE__TypeMap SPA_TYPE_INTERFACE_BASE "TypeMap"
|
||||
|
||||
#define SPA_VERSION_TYPE_MAP 0
|
||||
|
||||
/**
|
||||
* spa_type_map:
|
||||
*
|
||||
|
|
@ -40,6 +38,7 @@ extern "C" {
|
|||
struct spa_type_map {
|
||||
/* the version of this structure. This can be used to expand this
|
||||
* structure in the future */
|
||||
#define SPA_VERSION_TYPE_MAP 0
|
||||
uint32_t version;
|
||||
/**
|
||||
* spa_type_map::info
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue