mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
handle enum_param errors on port, node and device
This commit is contained in:
parent
dfc464413b
commit
cb2b1fb3ff
5 changed files with 32 additions and 5 deletions
|
|
@ -150,8 +150,12 @@ static void device_enum_params(void *object, uint32_t id, uint32_t start, uint32
|
|||
struct pw_resource *resource = object;
|
||||
struct resource_data *data = pw_resource_get_user_data(resource);
|
||||
struct pw_device *device = data->device;
|
||||
int res;
|
||||
|
||||
pw_device_for_each_param(device, id, start, num, filter, reply_param, resource);
|
||||
if ((res = pw_device_for_each_param(device, id, start, num,
|
||||
filter, reply_param, resource)) < 0)
|
||||
pw_core_resource_error(resource->client->core_resource,
|
||||
resource->id, res, spa_strerror(res));
|
||||
}
|
||||
|
||||
static void device_set_param(void *object, uint32_t id, uint32_t flags,
|
||||
|
|
|
|||
|
|
@ -488,6 +488,22 @@ struct pw_device_proxy_methods {
|
|||
const struct spa_pod *param);
|
||||
};
|
||||
|
||||
static inline void
|
||||
pw_device_proxy_enum_params(struct pw_device_proxy *device, uint32_t id, uint32_t index,
|
||||
uint32_t num, const struct spa_pod *filter)
|
||||
{
|
||||
pw_proxy_do((struct pw_proxy*)device, struct pw_device_proxy_methods, enum_params,
|
||||
id, index, num, filter);
|
||||
}
|
||||
|
||||
static inline void
|
||||
pw_device_proxy_set_param(struct pw_device_proxy *device, uint32_t id, uint32_t flags,
|
||||
const struct spa_pod *param)
|
||||
{
|
||||
pw_proxy_do((struct pw_proxy*)device, struct pw_device_proxy_methods, set_param,
|
||||
id, flags, param);
|
||||
}
|
||||
|
||||
#define PW_DEVICE_PROXY_EVENT_INFO 0
|
||||
#define PW_DEVICE_PROXY_EVENT_PARAM 1
|
||||
#define PW_DEVICE_PROXY_EVENT_NUM 2
|
||||
|
|
|
|||
|
|
@ -349,8 +349,12 @@ static void node_enum_params(void *object, uint32_t id, uint32_t index, uint32_t
|
|||
struct pw_resource *resource = object;
|
||||
struct resource_data *data = pw_resource_get_user_data(resource);
|
||||
struct pw_node *node = data->node;
|
||||
int res;
|
||||
|
||||
pw_node_for_each_param(node, id, index, num, filter, reply_param, resource);
|
||||
if ((res = pw_node_for_each_param(node, id, index, num,
|
||||
filter, reply_param, resource)) < 0)
|
||||
pw_core_resource_error(resource->client->core_resource,
|
||||
resource->id, res, spa_strerror(res));
|
||||
}
|
||||
|
||||
static void node_set_param(void *object, uint32_t id, uint32_t flags,
|
||||
|
|
|
|||
|
|
@ -400,9 +400,12 @@ static void port_enum_params(void *object, uint32_t id, uint32_t index, uint32_t
|
|||
struct pw_resource *resource = object;
|
||||
struct resource_data *data = pw_resource_get_user_data(resource);
|
||||
struct pw_port *port = data->port;
|
||||
int res;
|
||||
|
||||
pw_port_for_each_param(port, id, index, num, filter,
|
||||
reply_param, resource);
|
||||
if ((res = pw_port_for_each_param(port, id, index, num, filter,
|
||||
reply_param, resource)) < 0)
|
||||
pw_core_resource_error(resource->client->core_resource,
|
||||
resource->id, res, spa_strerror(res));
|
||||
}
|
||||
|
||||
static const struct pw_port_proxy_methods port_methods = {
|
||||
|
|
|
|||
|
|
@ -529,7 +529,7 @@ static void clear_buffers(struct pw_stream *stream)
|
|||
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
|
||||
int i, j;
|
||||
|
||||
pw_log_debug("stream %p: clear buffers", stream);
|
||||
pw_log_debug("stream %p: clear buffers %d", stream, impl->n_buffers);
|
||||
|
||||
for (i = 0; i < impl->n_buffers; i++) {
|
||||
struct buffer *b = &impl->buffers[i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue