mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
make bitfields unsigned
Remove driver property from client-node of client-stream.
This commit is contained in:
parent
787900e8bf
commit
092a0c660d
19 changed files with 64 additions and 59 deletions
|
|
@ -59,7 +59,7 @@ struct link {
|
||||||
uint32_t min_buffers;
|
uint32_t min_buffers;
|
||||||
uint32_t n_buffers;
|
uint32_t n_buffers;
|
||||||
struct spa_buffer **buffers;
|
struct spa_buffer **buffers;
|
||||||
int negotiated:1;
|
unsigned int negotiated:1;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct impl {
|
struct impl {
|
||||||
|
|
@ -90,7 +90,7 @@ struct impl {
|
||||||
struct spa_node *resample;
|
struct spa_node *resample;
|
||||||
|
|
||||||
struct spa_hook listener[4];
|
struct spa_hook listener[4];
|
||||||
int listening:1;
|
unsigned int listening:1;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int make_link(struct impl *this,
|
static int make_link(struct impl *this,
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ struct channelmix {
|
||||||
|
|
||||||
struct spa_log *log;
|
struct spa_log *log;
|
||||||
|
|
||||||
int is_identity:1;
|
unsigned int is_identity:1;
|
||||||
float volume;
|
float volume;
|
||||||
float matrix[MAX_CHANNELS * MAX_CHANNELS];
|
float matrix[MAX_CHANNELS * MAX_CHANNELS];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -117,8 +117,8 @@ struct impl {
|
||||||
struct port out_port;
|
struct port out_port;
|
||||||
|
|
||||||
struct channelmix mix;
|
struct channelmix mix;
|
||||||
int started:1;
|
unsigned int started:1;
|
||||||
int is_passthrough:1;
|
unsigned int is_passthrough:1;
|
||||||
uint32_t cpu_flags;
|
uint32_t cpu_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ struct convert {
|
||||||
uint32_t n_channels;
|
uint32_t n_channels;
|
||||||
uint32_t cpu_flags;
|
uint32_t cpu_flags;
|
||||||
|
|
||||||
int is_passthrough:1;
|
unsigned int is_passthrough:1;
|
||||||
float ns_data[MAX_NS];
|
float ns_data[MAX_NS];
|
||||||
uint32_t ns_idx;
|
uint32_t ns_idx;
|
||||||
uint32_t ns_size;
|
uint32_t ns_size;
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ struct impl {
|
||||||
|
|
||||||
uint32_t cpu_flags;
|
uint32_t cpu_flags;
|
||||||
struct convert conv;
|
struct convert conv;
|
||||||
int is_passthrough:1;
|
unsigned int is_passthrough:1;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define CHECK_PORT(this,d,id) (id == 0)
|
#define CHECK_PORT(this,d,id) (id == 0)
|
||||||
|
|
|
||||||
|
|
@ -104,10 +104,10 @@ struct impl {
|
||||||
|
|
||||||
struct convert conv;
|
struct convert conv;
|
||||||
uint32_t cpu_flags;
|
uint32_t cpu_flags;
|
||||||
int is_passthrough:1;
|
unsigned int is_passthrough:1;
|
||||||
int started:1;
|
unsigned int started:1;
|
||||||
int monitor:1;
|
unsigned int monitor:1;
|
||||||
int have_profile:1;
|
unsigned int have_profile:1;
|
||||||
|
|
||||||
float empty[MAX_SAMPLES + 15];
|
float empty[MAX_SAMPLES + 15];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ struct port {
|
||||||
uint32_t stride;
|
uint32_t stride;
|
||||||
uint32_t blocks;
|
uint32_t blocks;
|
||||||
uint32_t size;
|
uint32_t size;
|
||||||
int have_format:1;
|
unsigned int have_format:1;
|
||||||
|
|
||||||
struct buffer buffers[MAX_BUFFERS];
|
struct buffer buffers[MAX_BUFFERS];
|
||||||
uint32_t n_buffers;
|
uint32_t n_buffers;
|
||||||
|
|
@ -110,8 +110,8 @@ struct impl {
|
||||||
struct port in_port;
|
struct port in_port;
|
||||||
struct port out_port;
|
struct port out_port;
|
||||||
|
|
||||||
int started:1;
|
unsigned int started:1;
|
||||||
int monitor:1;
|
unsigned int monitor:1;
|
||||||
|
|
||||||
struct resample resample;
|
struct resample resample;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -106,8 +106,8 @@ struct impl {
|
||||||
|
|
||||||
uint32_t cpu_flags;
|
uint32_t cpu_flags;
|
||||||
struct convert conv;
|
struct convert conv;
|
||||||
int is_passthrough:1;
|
unsigned int is_passthrough:1;
|
||||||
int started:1;
|
unsigned int started:1;
|
||||||
|
|
||||||
bool have_profile;
|
bool have_profile;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -80,8 +80,8 @@ struct port {
|
||||||
struct spa_port_info info;
|
struct spa_port_info info;
|
||||||
struct spa_param_info params[5];
|
struct spa_param_info params[5];
|
||||||
|
|
||||||
int valid:1;
|
unsigned int valid:1;
|
||||||
int have_format:1;
|
unsigned int have_format:1;
|
||||||
|
|
||||||
struct buffer buffers[MAX_BUFFERS];
|
struct buffer buffers[MAX_BUFFERS];
|
||||||
uint32_t n_buffers;
|
uint32_t n_buffers;
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ struct port {
|
||||||
struct spa_param_info params[8];
|
struct spa_param_info params[8];
|
||||||
|
|
||||||
struct spa_video_info current_format;
|
struct spa_video_info current_format;
|
||||||
int have_format:1;
|
unsigned int have_format:1;
|
||||||
|
|
||||||
struct buffer buffers[MAX_BUFFERS];
|
struct buffer buffers[MAX_BUFFERS];
|
||||||
uint32_t n_buffers;
|
uint32_t n_buffers;
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ struct port {
|
||||||
struct spa_param_info params[8];
|
struct spa_param_info params[8];
|
||||||
|
|
||||||
struct spa_video_info current_format;
|
struct spa_video_info current_format;
|
||||||
int have_format:1;
|
unsigned int have_format:1;
|
||||||
|
|
||||||
struct buffer buffers[MAX_BUFFERS];
|
struct buffer buffers[MAX_BUFFERS];
|
||||||
uint32_t n_buffers;
|
uint32_t n_buffers;
|
||||||
|
|
|
||||||
|
|
@ -80,8 +80,8 @@ struct port {
|
||||||
struct spa_port_info info;
|
struct spa_port_info info;
|
||||||
struct spa_param_info params[8];
|
struct spa_param_info params[8];
|
||||||
|
|
||||||
int valid:1;
|
unsigned int valid:1;
|
||||||
int have_format:1;
|
unsigned int have_format:1;
|
||||||
|
|
||||||
struct buffer buffers[MAX_BUFFERS];
|
struct buffer buffers[MAX_BUFFERS];
|
||||||
uint32_t n_buffers;
|
uint32_t n_buffers;
|
||||||
|
|
|
||||||
|
|
@ -111,8 +111,8 @@ struct port {
|
||||||
struct spa_port_info info;
|
struct spa_port_info info;
|
||||||
struct pw_properties *properties;
|
struct pw_properties *properties;
|
||||||
|
|
||||||
int have_format:1;
|
unsigned int have_format:1;
|
||||||
int removed:1;
|
unsigned int removed:1;
|
||||||
uint32_t n_params;
|
uint32_t n_params;
|
||||||
struct spa_pod **params;
|
struct spa_pod **params;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1262,6 +1262,7 @@ struct pw_client_stream *pw_client_stream_new(struct pw_resource *resource,
|
||||||
struct pw_client *client = pw_resource_get_client(resource);
|
struct pw_client *client = pw_resource_get_client(resource);
|
||||||
struct pw_core *core = pw_client_get_core(client);
|
struct pw_core *core = pw_client_get_core(client);
|
||||||
const struct spa_support *support;
|
const struct spa_support *support;
|
||||||
|
struct pw_properties *props;
|
||||||
uint32_t n_support;
|
uint32_t n_support;
|
||||||
const char *name;
|
const char *name;
|
||||||
|
|
||||||
|
|
@ -1275,10 +1276,13 @@ struct pw_client_stream *pw_client_stream_new(struct pw_resource *resource,
|
||||||
|
|
||||||
pw_log_debug("client-stream %p: new", impl);
|
pw_log_debug("client-stream %p: new", impl);
|
||||||
|
|
||||||
|
props = pw_properties_copy(properties);
|
||||||
|
pw_properties_set(props, "node.driver", NULL);
|
||||||
|
|
||||||
impl->client_node = pw_client_node_new(
|
impl->client_node = pw_client_node_new(
|
||||||
resource,
|
resource,
|
||||||
parent,
|
parent,
|
||||||
pw_properties_copy(properties),
|
props,
|
||||||
false);
|
false);
|
||||||
if (impl->client_node == NULL)
|
if (impl->client_node == NULL)
|
||||||
goto error_no_node;
|
goto error_no_node;
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ struct impl {
|
||||||
|
|
||||||
void *user_data;
|
void *user_data;
|
||||||
|
|
||||||
int async_init:1;
|
unsigned int async_init:1;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void spa_node_free(void *data)
|
static void spa_node_free(void *data)
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ struct impl {
|
||||||
uint32_t next_position;
|
uint32_t next_position;
|
||||||
int last_error;
|
int last_error;
|
||||||
|
|
||||||
int pause_on_idle:1;
|
unsigned int pause_on_idle:1;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct resource_data {
|
struct resource_data {
|
||||||
|
|
@ -607,6 +607,7 @@ static void check_properties(struct pw_node *node)
|
||||||
driver = false;
|
driver = false;
|
||||||
|
|
||||||
if (node->driver != driver) {
|
if (node->driver != driver) {
|
||||||
|
pw_log_info("node %p: driver %d -> %d", node, node->driver, driver);
|
||||||
node->driver = driver;
|
node->driver = driver;
|
||||||
if (driver)
|
if (driver)
|
||||||
spa_list_append(&node->core->driver_list, &node->core_driver_link);
|
spa_list_append(&node->core->driver_list, &node->core_driver_link);
|
||||||
|
|
|
||||||
|
|
@ -125,9 +125,9 @@ struct pw_client {
|
||||||
void *user_data; /**< extra user data */
|
void *user_data; /**< extra user data */
|
||||||
|
|
||||||
struct ucred ucred; /**< ucred information */
|
struct ucred ucred; /**< ucred information */
|
||||||
int registered:1;
|
unsigned int registered:1;
|
||||||
int ucred_valid:1; /**< if the ucred member is valid */
|
unsigned int ucred_valid:1; /**< if the ucred member is valid */
|
||||||
int busy:1;
|
unsigned int busy:1;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define pw_global_emit(o,m,v,...) spa_hook_list_call(&o->listener_list, struct pw_global_events, m, v, ##__VA_ARGS__)
|
#define pw_global_emit(o,m,v,...) spa_hook_list_call(&o->listener_list, struct pw_global_events, m, v, ##__VA_ARGS__)
|
||||||
|
|
@ -217,7 +217,7 @@ struct pw_data_loop {
|
||||||
struct spa_source *event;
|
struct spa_source *event;
|
||||||
|
|
||||||
pthread_t thread;
|
pthread_t thread;
|
||||||
int running:1;
|
unsigned int running:1;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define pw_main_loop_emit(o,m,v,...) spa_hook_list_call(&o->listener_list, struct pw_main_loop_events, m, v, ##__VA_ARGS__)
|
#define pw_main_loop_emit(o,m,v,...) spa_hook_list_call(&o->listener_list, struct pw_main_loop_events, m, v, ##__VA_ARGS__)
|
||||||
|
|
@ -229,7 +229,7 @@ struct pw_main_loop {
|
||||||
struct spa_hook_list listener_list;
|
struct spa_hook_list listener_list;
|
||||||
struct spa_source *event;
|
struct spa_source *event;
|
||||||
|
|
||||||
int running:1;
|
unsigned int running:1;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct allocation {
|
struct allocation {
|
||||||
|
|
@ -277,7 +277,7 @@ struct pw_device {
|
||||||
|
|
||||||
void *user_data; /**< device user_data */
|
void *user_data; /**< device user_data */
|
||||||
|
|
||||||
int registered:1;
|
unsigned int registered:1;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define pw_module_emit(o,m,v,...) spa_hook_list_call(&o->listener_list, struct pw_module_events, m, v, ##__VA_ARGS__)
|
#define pw_module_emit(o,m,v,...) spa_hook_list_call(&o->listener_list, struct pw_module_events, m, v, ##__VA_ARGS__)
|
||||||
|
|
@ -365,16 +365,16 @@ struct pw_node {
|
||||||
struct pw_node_info info; /**< introspectable node info */
|
struct pw_node_info info; /**< introspectable node info */
|
||||||
struct spa_param_info params[MAX_PARAMS];
|
struct spa_param_info params[MAX_PARAMS];
|
||||||
|
|
||||||
int registered:1;
|
unsigned int registered:1;
|
||||||
int enabled:1; /**< if the node is enabled */
|
unsigned int enabled:1; /**< if the node is enabled */
|
||||||
int active:1; /**< if the node is active */
|
unsigned int active:1; /**< if the node is active */
|
||||||
int live:1; /**< if the node is live */
|
unsigned int live:1; /**< if the node is live */
|
||||||
int driver:1; /**< if the node can drive the graph */
|
unsigned int driver:1; /**< if the node can drive the graph */
|
||||||
int exported:1; /**< if the node is exported */
|
unsigned int exported:1; /**< if the node is exported */
|
||||||
int remote:1; /**< if the node is implemented remotely */
|
unsigned int remote:1; /**< if the node is implemented remotely */
|
||||||
int master:1; /**< a master node is one of the driver nodes that
|
unsigned int master:1; /**< a master node is one of the driver nodes that
|
||||||
* is selected to drive the graph */
|
* is selected to drive the graph */
|
||||||
int visited:1; /**< for sorting */
|
unsigned int visited:1; /**< for sorting */
|
||||||
|
|
||||||
uint32_t port_user_data_size; /**< extra size for port user data */
|
uint32_t port_user_data_size; /**< extra size for port user data */
|
||||||
|
|
||||||
|
|
@ -503,7 +503,7 @@ struct pw_port {
|
||||||
#define PW_PORT_MIX_FLAG_MIX_ONLY (1<<1) /**< only negotiate mix ports */
|
#define PW_PORT_MIX_FLAG_MIX_ONLY (1<<1) /**< only negotiate mix ports */
|
||||||
uint32_t mix_flags; /**< flags for the mixing */
|
uint32_t mix_flags; /**< flags for the mixing */
|
||||||
|
|
||||||
int allocated:1; /**< if buffers are allocated */
|
unsigned int allocated:1; /**< if buffers are allocated */
|
||||||
|
|
||||||
struct spa_list mix_list; /**< list of \ref pw_port_mix */
|
struct spa_list mix_list; /**< list of \ref pw_port_mix */
|
||||||
struct pw_map mix_port_map; /**< map from port_id from mixer */
|
struct pw_map mix_port_map; /**< map from port_id from mixer */
|
||||||
|
|
@ -527,7 +527,7 @@ struct pw_control_link {
|
||||||
struct pw_control *input;
|
struct pw_control *input;
|
||||||
uint32_t out_port;
|
uint32_t out_port;
|
||||||
uint32_t in_port;
|
uint32_t in_port;
|
||||||
int valid:1;
|
unsigned int valid:1;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define pw_link_emit(o,m,v,...) spa_hook_list_call(&o->listener_list, struct pw_link_events, m, v, ##__VA_ARGS__)
|
#define pw_link_emit(o,m,v,...) spa_hook_list_call(&o->listener_list, struct pw_link_events, m, v, ##__VA_ARGS__)
|
||||||
|
|
@ -566,8 +566,8 @@ struct pw_link {
|
||||||
|
|
||||||
void *user_data;
|
void *user_data;
|
||||||
|
|
||||||
int registered:1;
|
unsigned int registered:1;
|
||||||
int feedback:1;
|
unsigned int feedback:1;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define pw_resource_emit(o,m,v,...) spa_hook_list_call(&o->listener_list, struct pw_resource_events, m, v, ##__VA_ARGS__)
|
#define pw_resource_emit(o,m,v,...) spa_hook_list_call(&o->listener_list, struct pw_resource_events, m, v, ##__VA_ARGS__)
|
||||||
|
|
@ -607,7 +607,7 @@ struct pw_proxy {
|
||||||
struct spa_list link; /**< link in the remote */
|
struct spa_list link; /**< link in the remote */
|
||||||
|
|
||||||
uint32_t id; /**< client side id */
|
uint32_t id; /**< client side id */
|
||||||
int removed:1; /**< proxy was removed from server */
|
unsigned int removed:1; /**< proxy was removed from server */
|
||||||
|
|
||||||
struct spa_hook_list listener_list;
|
struct spa_hook_list listener_list;
|
||||||
struct spa_hook_list proxy_listener_list;
|
struct spa_hook_list proxy_listener_list;
|
||||||
|
|
@ -702,7 +702,7 @@ struct pw_factory {
|
||||||
|
|
||||||
void *user_data;
|
void *user_data;
|
||||||
|
|
||||||
int registered:1;
|
unsigned int registered:1;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define pw_control_emit(c,m,v,...) spa_hook_list_call(&c->listener_list, struct pw_control_events, m, v, ##__VA_ARGS__)
|
#define pw_control_emit(c,m,v,...) spa_hook_list_call(&c->listener_list, struct pw_control_events, m, v, ##__VA_ARGS__)
|
||||||
|
|
|
||||||
|
|
@ -84,14 +84,14 @@ struct control {
|
||||||
struct spa_list link;
|
struct spa_list link;
|
||||||
struct pw_stream_control control;
|
struct pw_stream_control control;
|
||||||
struct spa_pod *info;
|
struct spa_pod *info;
|
||||||
int emitted:1;
|
unsigned int emitted:1;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DEFAULT_VOLUME 1.0
|
#define DEFAULT_VOLUME 1.0
|
||||||
|
|
||||||
struct props {
|
struct props {
|
||||||
float volume;
|
float volume;
|
||||||
int changed:1;
|
unsigned int changed:1;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void reset_props(struct props *props)
|
static void reset_props(struct props *props)
|
||||||
|
|
@ -142,10 +142,10 @@ struct stream {
|
||||||
|
|
||||||
uint32_t param_propinfo;
|
uint32_t param_propinfo;
|
||||||
|
|
||||||
int async_connect:1;
|
unsigned int async_connect:1;
|
||||||
int disconnecting:1;
|
unsigned int disconnecting:1;
|
||||||
int free_data:1;
|
unsigned int free_data:1;
|
||||||
int subscribe:1;
|
unsigned int subscribe:1;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int get_param_index(uint32_t id)
|
static int get_param_index(uint32_t id)
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ struct pw_thread_loop {
|
||||||
|
|
||||||
int n_waiting;
|
int n_waiting;
|
||||||
int n_waiting_for_accept;
|
int n_waiting_for_accept;
|
||||||
int running:1;
|
unsigned int running:1;
|
||||||
};
|
};
|
||||||
/** \endcond */
|
/** \endcond */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue