mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
indent
This commit is contained in:
parent
f7de744ec9
commit
ded1ea69a1
54 changed files with 301 additions and 274 deletions
|
|
@ -61,7 +61,7 @@ int pw_connection_get_fd(struct pw_connection *conn, uint32_t index)
|
|||
return impl->in.fds[index];
|
||||
}
|
||||
|
||||
uint32_t pw_connection_add_fd(struct pw_connection * conn, int fd)
|
||||
uint32_t pw_connection_add_fd(struct pw_connection *conn, int fd)
|
||||
{
|
||||
struct pw_connection_impl *impl = SPA_CONTAINER_OF(conn, struct pw_connection_impl, this);
|
||||
uint32_t index, i;
|
||||
|
|
@ -210,10 +210,10 @@ void pw_connection_destroy(struct pw_connection *conn)
|
|||
*/
|
||||
bool
|
||||
pw_connection_get_next(struct pw_connection *conn,
|
||||
uint8_t * opcode,
|
||||
uint32_t * dest_id,
|
||||
uint8_t *opcode,
|
||||
uint32_t *dest_id,
|
||||
void **dt,
|
||||
uint32_t * sz)
|
||||
uint32_t *sz)
|
||||
{
|
||||
struct pw_connection_impl *impl = SPA_CONTAINER_OF(conn, struct pw_connection_impl, this);
|
||||
size_t len, size;
|
||||
|
|
@ -365,7 +365,7 @@ bool pw_connection_flush(struct pw_connection *conn)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool pw_connection_clear(struct pw_connection * conn)
|
||||
bool pw_connection_clear(struct pw_connection *conn)
|
||||
{
|
||||
struct pw_connection_impl *impl = SPA_CONTAINER_OF(conn, struct pw_connection_impl, this);
|
||||
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ extern "C" {
|
|||
struct pw_connection {
|
||||
int fd;
|
||||
|
||||
PW_SIGNAL(need_flush, (struct pw_listener * listener, struct pw_connection * conn));
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener * listener, struct pw_connection * conn));
|
||||
PW_SIGNAL(need_flush, (struct pw_listener *listener, struct pw_connection *conn));
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener *listener, struct pw_connection *conn));
|
||||
};
|
||||
|
||||
struct pw_connection *
|
||||
|
|
|
|||
|
|
@ -539,7 +539,7 @@ bool pw_context_connect(struct pw_context *context, enum pw_context_flags flags)
|
|||
*
|
||||
* Returns: %TRUE on success.
|
||||
*/
|
||||
bool pw_context_connect_fd(struct pw_context * context, enum pw_context_flags flags, int fd)
|
||||
bool pw_context_connect_fd(struct pw_context *context, enum pw_context_flags flags, int fd)
|
||||
{
|
||||
struct context *impl = SPA_CONTAINER_OF(context, struct context, this);
|
||||
|
||||
|
|
@ -603,7 +603,7 @@ bool pw_context_connect_fd(struct pw_context * context, enum pw_context_flags fl
|
|||
*
|
||||
* Returns: %TRUE on success.
|
||||
*/
|
||||
bool pw_context_disconnect(struct pw_context * context)
|
||||
bool pw_context_disconnect(struct pw_context *context)
|
||||
{
|
||||
struct context *impl = SPA_CONTAINER_OF(context, struct context, this);
|
||||
|
||||
|
|
|
|||
|
|
@ -83,13 +83,13 @@ struct pw_context {
|
|||
|
||||
enum pw_context_state state;
|
||||
char *error;
|
||||
PW_SIGNAL(state_changed, (struct pw_listener * listener, struct pw_context * context));
|
||||
PW_SIGNAL(state_changed, (struct pw_listener *listener, struct pw_context *context));
|
||||
|
||||
PW_SIGNAL(subscription, (struct pw_listener * listener,
|
||||
struct pw_context * context,
|
||||
PW_SIGNAL(subscription, (struct pw_listener *listener,
|
||||
struct pw_context *context,
|
||||
enum pw_subscription_event event, uint32_t type, uint32_t id));
|
||||
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener * listener, struct pw_context * context));
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener *listener, struct pw_context *context));
|
||||
};
|
||||
|
||||
struct pw_context *
|
||||
|
|
|
|||
|
|
@ -41,15 +41,15 @@ extern "C" {
|
|||
#define PW_CORE_METHOD_NUM 6
|
||||
|
||||
struct pw_core_methods {
|
||||
void (*client_update) (void *object, const struct spa_dict * props);
|
||||
void (*client_update) (void *object, const struct spa_dict *props);
|
||||
void (*sync) (void *object, uint32_t seq);
|
||||
void (*get_registry) (void *object, uint32_t new_id);
|
||||
void (*create_node) (void *object,
|
||||
const char *factory_name,
|
||||
const char *name, const struct spa_dict * props, uint32_t new_id);
|
||||
const char *name, const struct spa_dict *props, uint32_t new_id);
|
||||
void (*create_client_node) (void *object,
|
||||
const char *name,
|
||||
const struct spa_dict * props, uint32_t new_id);
|
||||
const struct spa_dict *props, uint32_t new_id);
|
||||
void (*update_types) (void *object,
|
||||
uint32_t first_id, uint32_t n_types, const char **types);
|
||||
};
|
||||
|
|
@ -69,7 +69,7 @@ struct pw_core_methods {
|
|||
#define PW_CORE_EVENT_NUM 5
|
||||
|
||||
struct pw_core_events {
|
||||
void (*info) (void *object, struct pw_core_info * info);
|
||||
void (*info) (void *object, struct pw_core_info *info);
|
||||
void (*done) (void *object, uint32_t seq);
|
||||
void (*error) (void *object, uint32_t id, int res, const char *error, ...);
|
||||
void (*remove_id) (void *object, uint32_t id);
|
||||
|
|
@ -109,7 +109,7 @@ struct pw_registry_events {
|
|||
#define PW_MODULE_EVENT_NUM 1
|
||||
|
||||
struct pw_module_events {
|
||||
void (*info) (void *object, struct pw_module_info * info);
|
||||
void (*info) (void *object, struct pw_module_info *info);
|
||||
};
|
||||
|
||||
#define pw_module_notify_info(r,...) ((struct pw_module_events*)r->iface->events)->info(r,__VA_ARGS__)
|
||||
|
|
@ -118,7 +118,7 @@ struct pw_module_events {
|
|||
#define PW_NODE_EVENT_NUM 1
|
||||
|
||||
struct pw_node_events {
|
||||
void (*info) (void *object, struct pw_node_info * info);
|
||||
void (*info) (void *object, struct pw_node_info *info);
|
||||
};
|
||||
|
||||
#define pw_node_notify_info(r,...) ((struct pw_node_events*)r->iface->events)->info(r,__VA_ARGS__)
|
||||
|
|
@ -143,7 +143,7 @@ struct pw_client_node_methods {
|
|||
#define PW_MESSAGE_NODE_UPDATE_PROPS (1 << 2)
|
||||
uint32_t change_mask,
|
||||
uint32_t max_input_ports,
|
||||
uint32_t max_output_ports, const struct spa_props * props);
|
||||
uint32_t max_output_ports, const struct spa_props *props);
|
||||
|
||||
void (*port_update) (void *object, enum spa_direction direction, uint32_t port_id,
|
||||
#define PW_MESSAGE_PORT_UPDATE_POSSIBLE_FORMATS (1 << 0)
|
||||
|
|
@ -152,11 +152,11 @@ struct pw_client_node_methods {
|
|||
#define PW_MESSAGE_PORT_UPDATE_INFO (1 << 3)
|
||||
uint32_t change_mask,
|
||||
uint32_t n_possible_formats,
|
||||
const struct spa_format ** possible_formats,
|
||||
const struct spa_format * format,
|
||||
const struct spa_format **possible_formats,
|
||||
const struct spa_format *format,
|
||||
uint32_t n_params,
|
||||
const struct spa_param ** params, const struct spa_port_info * info);
|
||||
void (*event) (void *object, struct spa_event * event);
|
||||
const struct spa_param **params, const struct spa_port_info *info);
|
||||
void (*event) (void *object, struct spa_event *event);
|
||||
void (*destroy) (void *object);
|
||||
};
|
||||
|
||||
|
|
@ -180,7 +180,7 @@ struct pw_client_node_methods {
|
|||
|
||||
struct pw_client_node_events {
|
||||
void (*done) (void *object, int readfd, int writefd);
|
||||
void (*event) (void *object, const struct spa_event * event);
|
||||
void (*event) (void *object, const struct spa_event *event);
|
||||
void (*add_port) (void *object,
|
||||
uint32_t seq, enum spa_direction direction, uint32_t port_id);
|
||||
void (*remove_port) (void *object,
|
||||
|
|
@ -188,7 +188,7 @@ struct pw_client_node_events {
|
|||
void (*set_format) (void *object,
|
||||
uint32_t seq,
|
||||
enum spa_direction direction,
|
||||
uint32_t port_id, uint32_t flags, const struct spa_format * format);
|
||||
uint32_t port_id, uint32_t flags, const struct spa_format *format);
|
||||
void (*set_property) (void *object,
|
||||
uint32_t seq, uint32_t id, uint32_t size, const void *value);
|
||||
void (*add_mem) (void *object,
|
||||
|
|
@ -200,9 +200,9 @@ struct pw_client_node_events {
|
|||
uint32_t seq,
|
||||
enum spa_direction direction,
|
||||
uint32_t port_id,
|
||||
uint32_t n_buffers, struct pw_client_node_buffer * buffers);
|
||||
void (*node_command) (void *object, uint32_t seq, const struct spa_command * command);
|
||||
void (*port_command) (void *object, uint32_t port_id, const struct spa_command * command);
|
||||
uint32_t n_buffers, struct pw_client_node_buffer *buffers);
|
||||
void (*node_command) (void *object, uint32_t seq, const struct spa_command *command);
|
||||
void (*port_command) (void *object, uint32_t port_id, const struct spa_command *command);
|
||||
void (*transport) (void *object, int memfd, uint32_t offset, uint32_t size);
|
||||
};
|
||||
|
||||
|
|
@ -222,7 +222,7 @@ struct pw_client_node_events {
|
|||
#define PW_CLIENT_EVENT_NUM 1
|
||||
|
||||
struct pw_client_events {
|
||||
void (*info) (void *object, struct pw_client_info * info);
|
||||
void (*info) (void *object, struct pw_client_info *info);
|
||||
};
|
||||
|
||||
#define pw_client_notify_info(r,...) ((struct pw_client_events*)r->iface->events)->info(r,__VA_ARGS__)
|
||||
|
|
@ -231,7 +231,7 @@ struct pw_client_events {
|
|||
#define PW_LINK_EVENT_NUM 1
|
||||
|
||||
struct pw_link_events {
|
||||
void (*info) (void *object, struct pw_link_info * info);
|
||||
void (*info) (void *object, struct pw_link_info *info);
|
||||
};
|
||||
|
||||
#define pw_link_notify_info(r,...) ((struct pw_link_events*)r->iface->events)->info(r,__VA_ARGS__)
|
||||
|
|
|
|||
|
|
@ -143,8 +143,8 @@ pw_core_info_free(struct pw_core_info *info);
|
|||
*
|
||||
* Callback with information about the PipeWire core in @info.
|
||||
*/
|
||||
typedef void (*pw_core_info_cb_t) (struct pw_context * c,
|
||||
int res, const struct pw_core_info * info, void *user_data);
|
||||
typedef void (*pw_core_info_cb_t) (struct pw_context *c,
|
||||
int res, const struct pw_core_info *info, void *user_data);
|
||||
|
||||
void
|
||||
pw_context_get_core_info(struct pw_context *context, pw_core_info_cb_t cb, void *user_data);
|
||||
|
|
@ -183,8 +183,8 @@ pw_module_info_free(struct pw_module_info *info);
|
|||
*
|
||||
* Callback with information about the PipeWire module in @info.
|
||||
*/
|
||||
typedef void (*pw_module_info_cb_t) (struct pw_context * c,
|
||||
int res, const struct pw_module_info * info, void *user_data);
|
||||
typedef void (*pw_module_info_cb_t) (struct pw_context *c,
|
||||
int res, const struct pw_module_info *info, void *user_data);
|
||||
|
||||
void
|
||||
pw_context_list_module_info(struct pw_context *context,
|
||||
|
|
@ -224,8 +224,8 @@ pw_client_info_free(struct pw_client_info *info);
|
|||
*
|
||||
* Callback with information about the PipeWire client in @info.
|
||||
*/
|
||||
typedef void (*pw_client_info_cb_t) (struct pw_context * c,
|
||||
int res, const struct pw_client_info * info, void *user_data);
|
||||
typedef void (*pw_client_info_cb_t) (struct pw_context *c,
|
||||
int res, const struct pw_client_info *info, void *user_data);
|
||||
|
||||
void
|
||||
pw_context_list_client_info(struct pw_context *context,
|
||||
|
|
@ -279,8 +279,8 @@ pw_node_info_free(struct pw_node_info *info);
|
|||
*
|
||||
* Callback with information about the PipeWire node in @info.
|
||||
*/
|
||||
typedef void (*pw_node_info_cb_t) (struct pw_context * c,
|
||||
int res, const struct pw_node_info * info, void *user_data);
|
||||
typedef void (*pw_node_info_cb_t) (struct pw_context *c,
|
||||
int res, const struct pw_node_info *info, void *user_data);
|
||||
|
||||
void
|
||||
pw_context_list_node_info(struct pw_context *context, pw_node_info_cb_t cb, void *user_data);
|
||||
|
|
@ -327,8 +327,8 @@ pw_link_info_free(struct pw_link_info *info);
|
|||
*
|
||||
* Callback with information about the PipeWire link in @info.
|
||||
*/
|
||||
typedef void (*pw_link_info_cb_t) (struct pw_context * c,
|
||||
int res, const struct pw_link_info * info, void *user_data);
|
||||
typedef void (*pw_link_info_cb_t) (struct pw_context *c,
|
||||
int res, const struct pw_link_info *info, void *user_data);
|
||||
|
||||
void
|
||||
pw_context_list_link_info(struct pw_context *context, pw_link_info_cb_t cb, void *user_data);
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@ struct pw_loop {
|
|||
struct spa_loop_control *control;
|
||||
struct spa_loop_utils *utils;
|
||||
|
||||
PW_SIGNAL(before_iterate, (struct pw_listener * listener, struct pw_loop * loop));
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener * listener, struct pw_loop * loop));
|
||||
PW_SIGNAL(before_iterate, (struct pw_listener *listener, struct pw_loop *loop));
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener *listener, struct pw_loop *loop));
|
||||
};
|
||||
|
||||
struct pw_loop *
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ struct pw_proxy {
|
|||
|
||||
void *user_data;
|
||||
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener * listener, struct pw_proxy * proxy));
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener *listener, struct pw_proxy *proxy));
|
||||
};
|
||||
|
||||
struct pw_proxy *
|
||||
|
|
|
|||
|
|
@ -614,8 +614,8 @@ handle_node_command(struct pw_stream *stream, uint32_t seq, const struct spa_com
|
|||
stream_set_state(stream, PW_STREAM_STATE_STREAMING, NULL);
|
||||
}
|
||||
} else if (SPA_COMMAND_TYPE(command) == context->type.command_node.ClockUpdate) {
|
||||
struct spa_command_node_clock_update *cu =
|
||||
(struct spa_command_node_clock_update *) command;
|
||||
struct spa_command_node_clock_update *cu = (__typeof__(cu)) command;
|
||||
|
||||
if (cu->body.flags.value & SPA_COMMAND_NODE_CLOCK_UPDATE_FLAG_LIVE) {
|
||||
pw_properties_set(stream->properties, "pipewire.latency.is-live", "1");
|
||||
pw_properties_setf(stream->properties,
|
||||
|
|
@ -976,8 +976,8 @@ pw_stream_connect(struct pw_stream *stream,
|
|||
* Returns: %true on success
|
||||
*/
|
||||
bool
|
||||
pw_stream_finish_format(struct pw_stream * stream,
|
||||
int res, struct spa_param ** params, uint32_t n_params)
|
||||
pw_stream_finish_format(struct pw_stream *stream,
|
||||
int res, struct spa_param **params, uint32_t n_params)
|
||||
{
|
||||
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
|
||||
|
||||
|
|
@ -1007,7 +1007,7 @@ pw_stream_finish_format(struct pw_stream * stream,
|
|||
*
|
||||
* Returns: %true on success
|
||||
*/
|
||||
bool pw_stream_disconnect(struct pw_stream * stream)
|
||||
bool pw_stream_disconnect(struct pw_stream *stream)
|
||||
{
|
||||
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
|
||||
|
||||
|
|
@ -1020,7 +1020,7 @@ bool pw_stream_disconnect(struct pw_stream * stream)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool pw_stream_get_time(struct pw_stream * stream, struct pw_time * time)
|
||||
bool pw_stream_get_time(struct pw_stream *stream, struct pw_time *time)
|
||||
{
|
||||
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
|
||||
int64_t elapsed;
|
||||
|
|
@ -1045,7 +1045,7 @@ bool pw_stream_get_time(struct pw_stream * stream, struct pw_time * time)
|
|||
* Returns: the id of an empty buffer or #SPA_ID_INVALID when no buffer is
|
||||
* available.
|
||||
*/
|
||||
uint32_t pw_stream_get_empty_buffer(struct pw_stream * stream)
|
||||
uint32_t pw_stream_get_empty_buffer(struct pw_stream *stream)
|
||||
{
|
||||
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
|
||||
struct buffer_id *bid;
|
||||
|
|
@ -1067,7 +1067,7 @@ uint32_t pw_stream_get_empty_buffer(struct pw_stream * stream)
|
|||
*
|
||||
* Returns: %true on success.
|
||||
*/
|
||||
bool pw_stream_recycle_buffer(struct pw_stream * stream, uint32_t id)
|
||||
bool pw_stream_recycle_buffer(struct pw_stream *stream, uint32_t id)
|
||||
{
|
||||
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
|
||||
struct pw_event_transport_reuse_buffer rb = PW_EVENT_TRANSPORT_REUSE_BUFFER_INIT
|
||||
|
|
@ -1121,7 +1121,7 @@ struct spa_buffer *pw_stream_peek_buffer(struct pw_stream *stream, uint32_t id)
|
|||
*
|
||||
* Returns: %true when @id was handled
|
||||
*/
|
||||
bool pw_stream_send_buffer(struct pw_stream * stream, uint32_t id)
|
||||
bool pw_stream_send_buffer(struct pw_stream *stream, uint32_t id)
|
||||
{
|
||||
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
|
||||
struct buffer_id *bid;
|
||||
|
|
|
|||
|
|
@ -71,22 +71,22 @@ struct pw_stream {
|
|||
char *name;
|
||||
struct pw_properties *properties;
|
||||
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener * listener, struct pw_stream * stream));
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener *listener, struct pw_stream *stream));
|
||||
|
||||
enum pw_stream_state state;
|
||||
char *error;
|
||||
PW_SIGNAL(state_changed, (struct pw_listener * listener, struct pw_stream * stream));
|
||||
PW_SIGNAL(state_changed, (struct pw_listener *listener, struct pw_stream *stream));
|
||||
|
||||
PW_SIGNAL(format_changed, (struct pw_listener * listener,
|
||||
struct pw_stream * stream, struct spa_format * format));
|
||||
PW_SIGNAL(format_changed, (struct pw_listener *listener,
|
||||
struct pw_stream *stream, struct spa_format *format));
|
||||
|
||||
PW_SIGNAL(add_buffer, (struct pw_listener * listener,
|
||||
struct pw_stream * stream, uint32_t id));
|
||||
PW_SIGNAL(remove_buffer, (struct pw_listener * listener,
|
||||
struct pw_stream * stream, uint32_t id));
|
||||
PW_SIGNAL(new_buffer, (struct pw_listener * listener,
|
||||
struct pw_stream * stream, uint32_t id));
|
||||
PW_SIGNAL(need_buffer, (struct pw_listener * listener, struct pw_stream * stream));
|
||||
PW_SIGNAL(add_buffer, (struct pw_listener *listener,
|
||||
struct pw_stream *stream, uint32_t id));
|
||||
PW_SIGNAL(remove_buffer, (struct pw_listener *listener,
|
||||
struct pw_stream *stream, uint32_t id));
|
||||
PW_SIGNAL(new_buffer, (struct pw_listener *listener,
|
||||
struct pw_stream *stream, uint32_t id));
|
||||
PW_SIGNAL(need_buffer, (struct pw_listener *listener, struct pw_stream *stream));
|
||||
};
|
||||
|
||||
struct pw_stream *
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ struct pw_thread_main_loop {
|
|||
struct pw_loop *loop;
|
||||
char *name;
|
||||
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener * listener,
|
||||
struct pw_thread_main_loop * loop));
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener *listener,
|
||||
struct pw_thread_main_loop *loop));
|
||||
};
|
||||
|
||||
struct pw_thread_main_loop *
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ struct pw_transport_area {
|
|||
};
|
||||
|
||||
struct pw_transport {
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener * listener, struct pw_transport * trans));
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener *listener, struct pw_transport *trans));
|
||||
|
||||
struct pw_transport_area *area;
|
||||
struct spa_port_io *inputs;
|
||||
|
|
@ -125,7 +125,7 @@ struct pw_event_transport_reuse_buffer {
|
|||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* __PIPEWIRE_TRANSPORT_H__ */
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ extern "C" {
|
|||
#include <spa/pod-utils.h>
|
||||
|
||||
const char *
|
||||
pw_split_walk(const char *str, const char *delimiter, size_t * len, const char **state);
|
||||
pw_split_walk(const char *str, const char *delimiter, size_t *len, const char **state);
|
||||
|
||||
char **
|
||||
pw_split_strv(const char *str, const char *delimiter, int max_tokens, int *n_tokens);
|
||||
|
|
@ -50,7 +50,7 @@ pw_spa_pod_copy(const struct spa_pod *pod)
|
|||
#define spa_param_copy(p) ((struct spa_param*)pw_spa_pod_copy(&(p)->object.pod))
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* __PIPEWIRE_UTILS_H__ */
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ bool pw_daemon_config_load_file(struct pw_daemon_config *config, const char *fil
|
|||
*
|
||||
* Return: %true on success, otherwise %false and @err is set.
|
||||
*/
|
||||
bool pw_daemon_config_load(struct pw_daemon_config * config, char **err)
|
||||
bool pw_daemon_config_load(struct pw_daemon_config *config, char **err)
|
||||
{
|
||||
const char *filename;
|
||||
|
||||
|
|
@ -178,7 +178,7 @@ bool pw_daemon_config_load(struct pw_daemon_config * config, char **err)
|
|||
*
|
||||
* Returns: %true if all commands where executed with success, otherwise %false.
|
||||
*/
|
||||
bool pw_daemon_config_run_commands(struct pw_daemon_config * config, struct pw_core * core)
|
||||
bool pw_daemon_config_run_commands(struct pw_daemon_config *config, struct pw_core *core)
|
||||
{
|
||||
char *err = NULL;
|
||||
bool ret = true;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
GST_DEBUG_CATEGORY (pipewire_debug);
|
||||
|
||||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
plugin_init (GstPlugin *plugin)
|
||||
{
|
||||
pw_init (NULL, NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ do_create_node(struct pw_access *access,
|
|||
|
||||
|
||||
static DBusHandlerResult
|
||||
portal_response(DBusConnection * connection, DBusMessage * msg, void *user_data)
|
||||
portal_response(DBusConnection *connection, DBusMessage *msg, void *user_data)
|
||||
{
|
||||
struct client_info *cinfo = user_data;
|
||||
|
||||
|
|
@ -438,7 +438,7 @@ static void dispatch_cb(struct spa_loop_utils *utils, struct spa_source *source,
|
|||
pw_loop_enable_idle(impl->core->main_loop->loop, source, false);
|
||||
}
|
||||
|
||||
static void dispatch_status(DBusConnection * conn, DBusDispatchStatus status, void *userdata)
|
||||
static void dispatch_status(DBusConnection *conn, DBusDispatchStatus status, void *userdata)
|
||||
{
|
||||
struct impl *impl = userdata;
|
||||
|
||||
|
|
@ -446,7 +446,7 @@ static void dispatch_status(DBusConnection * conn, DBusDispatchStatus status, vo
|
|||
impl->dispatch_event, status == DBUS_DISPATCH_COMPLETE ? false : true);
|
||||
}
|
||||
|
||||
static inline enum spa_io dbus_to_io(DBusWatch * watch)
|
||||
static inline enum spa_io dbus_to_io(DBusWatch *watch)
|
||||
{
|
||||
enum spa_io mask;
|
||||
unsigned int flags;
|
||||
|
|
@ -494,7 +494,7 @@ handle_io_event(struct spa_loop_utils *utils,
|
|||
dbus_watch_handle(watch, io_to_dbus(mask));
|
||||
}
|
||||
|
||||
static dbus_bool_t add_watch(DBusWatch * watch, void *userdata)
|
||||
static dbus_bool_t add_watch(DBusWatch *watch, void *userdata)
|
||||
{
|
||||
struct impl *impl = userdata;
|
||||
struct spa_source *source;
|
||||
|
|
@ -511,7 +511,7 @@ static dbus_bool_t add_watch(DBusWatch * watch, void *userdata)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static void remove_watch(DBusWatch * watch, void *userdata)
|
||||
static void remove_watch(DBusWatch *watch, void *userdata)
|
||||
{
|
||||
struct impl *impl = userdata;
|
||||
struct spa_source *source;
|
||||
|
|
@ -520,7 +520,7 @@ static void remove_watch(DBusWatch * watch, void *userdata)
|
|||
pw_loop_destroy_source(impl->core->main_loop->loop, source);
|
||||
}
|
||||
|
||||
static void toggle_watch(DBusWatch * watch, void *userdata)
|
||||
static void toggle_watch(DBusWatch *watch, void *userdata)
|
||||
{
|
||||
struct impl *impl = userdata;
|
||||
struct spa_source *source;
|
||||
|
|
@ -547,7 +547,7 @@ handle_timer_event(struct spa_loop_utils *utils, struct spa_source *source, void
|
|||
}
|
||||
}
|
||||
|
||||
static dbus_bool_t add_timeout(DBusTimeout * timeout, void *userdata)
|
||||
static dbus_bool_t add_timeout(DBusTimeout *timeout, void *userdata)
|
||||
{
|
||||
struct impl *impl = userdata;
|
||||
struct spa_source *source;
|
||||
|
|
@ -568,7 +568,7 @@ static dbus_bool_t add_timeout(DBusTimeout * timeout, void *userdata)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static void remove_timeout(DBusTimeout * timeout, void *userdata)
|
||||
static void remove_timeout(DBusTimeout *timeout, void *userdata)
|
||||
{
|
||||
struct impl *impl = userdata;
|
||||
struct spa_source *source;
|
||||
|
|
@ -577,7 +577,7 @@ static void remove_timeout(DBusTimeout * timeout, void *userdata)
|
|||
pw_loop_destroy_source(impl->core->main_loop->loop, source);
|
||||
}
|
||||
|
||||
static void toggle_timeout(DBusTimeout * timeout, void *userdata)
|
||||
static void toggle_timeout(DBusTimeout *timeout, void *userdata)
|
||||
{
|
||||
struct impl *impl = userdata;
|
||||
struct spa_source *source;
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ setup_video_node(struct pw_core *core, struct spa_node *spa_node, struct pw_prop
|
|||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
bool pipewire__module_init(struct pw_module * module, const char *args)
|
||||
bool pipewire__module_init(struct pw_module *module, const char *args)
|
||||
{
|
||||
struct pw_properties *video_props = NULL, *audio_props = NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ struct pw_spa_monitor {
|
|||
char *system_name;
|
||||
struct spa_handle *handle;
|
||||
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener * listener, struct pw_spa_monitor * monitor));
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener *listener, struct pw_spa_monitor *monitor));
|
||||
};
|
||||
|
||||
struct pw_spa_monitor *
|
||||
|
|
|
|||
|
|
@ -33,11 +33,11 @@ struct pw_spa_node {
|
|||
char *lib;
|
||||
char *factory_name;
|
||||
struct spa_handle *handle;
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener * listener, struct pw_spa_node * node));
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener *listener, struct pw_spa_node *node));
|
||||
};
|
||||
|
||||
typedef int (*setup_node_t) (struct pw_core * core,
|
||||
struct spa_node * spa_node, struct pw_properties * pw_props);
|
||||
typedef int (*setup_node_t) (struct pw_core *core,
|
||||
struct spa_node *spa_node, struct pw_properties *pw_props);
|
||||
|
||||
struct pw_spa_node *
|
||||
pw_spa_node_load(struct pw_core *core,
|
||||
|
|
|
|||
|
|
@ -35,9 +35,9 @@ struct pw_access_data {
|
|||
int res;
|
||||
struct pw_resource *resource;
|
||||
|
||||
void *(*async_copy) (struct pw_access_data * data, size_t size);
|
||||
void (*complete_cb) (struct pw_access_data * data);
|
||||
void (*free_cb) (struct pw_access_data * data);
|
||||
void *(*async_copy) (struct pw_access_data *data, size_t size);
|
||||
void (*complete_cb) (struct pw_access_data *data);
|
||||
void (*free_cb) (struct pw_access_data *data);
|
||||
void *user_data;
|
||||
};
|
||||
|
||||
|
|
@ -48,15 +48,15 @@ struct pw_access_data {
|
|||
* PipeWire Access support struct.
|
||||
*/
|
||||
struct pw_access {
|
||||
int (*view_global) (struct pw_access * access,
|
||||
struct pw_client * client, struct pw_global * global);
|
||||
int (*create_node) (struct pw_access * access,
|
||||
struct pw_access_data * data,
|
||||
int (*view_global) (struct pw_access *access,
|
||||
struct pw_client *client, struct pw_global *global);
|
||||
int (*create_node) (struct pw_access *access,
|
||||
struct pw_access_data *data,
|
||||
const char *factory_name,
|
||||
const char *name, struct pw_properties * properties);
|
||||
int (*create_client_node) (struct pw_access * access,
|
||||
struct pw_access_data * data,
|
||||
const char *name, struct pw_properties * properties);
|
||||
const char *name, struct pw_properties *properties);
|
||||
int (*create_client_node) (struct pw_access *access,
|
||||
struct pw_access_data *data,
|
||||
const char *name, struct pw_properties *properties);
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
|
|
@ -223,9 +223,10 @@ spa_proxy_node_set_callbacks(struct spa_node *node,
|
|||
|
||||
static int
|
||||
spa_proxy_node_get_n_ports(struct spa_node *node,
|
||||
uint32_t * n_input_ports,
|
||||
uint32_t * max_input_ports,
|
||||
uint32_t * n_output_ports, uint32_t * max_output_ports)
|
||||
uint32_t *n_input_ports,
|
||||
uint32_t *max_input_ports,
|
||||
uint32_t *n_output_ports,
|
||||
uint32_t *max_output_ports)
|
||||
{
|
||||
struct proxy *this;
|
||||
|
||||
|
|
@ -249,7 +250,9 @@ spa_proxy_node_get_n_ports(struct spa_node *node,
|
|||
static int
|
||||
spa_proxy_node_get_port_ids(struct spa_node *node,
|
||||
uint32_t n_input_ports,
|
||||
uint32_t * input_ids, uint32_t n_output_ports, uint32_t * output_ids)
|
||||
uint32_t *input_ids,
|
||||
uint32_t n_output_ports,
|
||||
uint32_t *output_ids)
|
||||
{
|
||||
struct proxy *this;
|
||||
int c, i;
|
||||
|
|
@ -690,7 +693,8 @@ spa_proxy_node_port_alloc_buffers(struct spa_node *node,
|
|||
uint32_t port_id,
|
||||
struct spa_param **params,
|
||||
uint32_t n_params,
|
||||
struct spa_buffer **buffers, uint32_t * n_buffers)
|
||||
struct spa_buffer **buffers,
|
||||
uint32_t *n_buffers)
|
||||
{
|
||||
struct proxy *this;
|
||||
struct proxy_port *port;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ struct pw_client_node {
|
|||
struct pw_client *client;
|
||||
struct pw_resource *resource;
|
||||
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener * listener, struct pw_client_node * node));
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener *listener, struct pw_client_node *node));
|
||||
};
|
||||
|
||||
struct pw_client_node *
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ struct pw_client {
|
|||
struct pw_global *global;
|
||||
|
||||
struct pw_properties *properties;
|
||||
PW_SIGNAL(properties_changed, (struct pw_listener * listener, struct pw_client * client));
|
||||
PW_SIGNAL(properties_changed, (struct pw_listener *listener, struct pw_client *client));
|
||||
|
||||
struct pw_client_info info;
|
||||
bool ucred_valid;
|
||||
|
|
@ -59,12 +59,12 @@ struct pw_client {
|
|||
struct pw_map types;
|
||||
|
||||
struct spa_list resource_list;
|
||||
PW_SIGNAL(resource_added, (struct pw_listener * listener,
|
||||
struct pw_client * client, struct pw_resource * resource));
|
||||
PW_SIGNAL(resource_removed, (struct pw_listener * listener,
|
||||
struct pw_client * client, struct pw_resource * resource));
|
||||
PW_SIGNAL(resource_added, (struct pw_listener *listener,
|
||||
struct pw_client *client, struct pw_resource *resource));
|
||||
PW_SIGNAL(resource_removed, (struct pw_listener *listener,
|
||||
struct pw_client *client, struct pw_resource *resource));
|
||||
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener * listener, struct pw_client * client));
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener *listener, struct pw_client *client));
|
||||
};
|
||||
|
||||
struct pw_client *
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include "command.h"
|
||||
|
||||
typedef bool(*pw_command_func_t) (struct pw_command * command, struct pw_core * core, char **err);
|
||||
typedef bool(*pw_command_func_t) (struct pw_command *command, struct pw_core *core, char **err);
|
||||
|
||||
static bool execute_command_module_load(struct pw_command *command,
|
||||
struct pw_core *core, char **err);
|
||||
|
|
@ -149,7 +149,7 @@ struct pw_command *pw_command_parse(const char *line, char **err)
|
|||
*
|
||||
* Returns: %true if @command was executed successfully, %false otherwise.
|
||||
*/
|
||||
bool pw_command_run(struct pw_command * command, struct pw_core * core, char **err)
|
||||
bool pw_command_run(struct pw_command *command, struct pw_core *core, char **err)
|
||||
{
|
||||
struct impl *impl = SPA_CONTAINER_OF(command, struct impl, this);
|
||||
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ struct pw_global;
|
|||
#include <pipewire/server/link.h>
|
||||
#include <pipewire/server/node-factory.h>
|
||||
|
||||
typedef int (*pw_bind_func_t) (struct pw_global * global,
|
||||
struct pw_client * client, uint32_t version, uint32_t id);
|
||||
typedef int (*pw_bind_func_t) (struct pw_global *global,
|
||||
struct pw_client *client, uint32_t version, uint32_t id);
|
||||
|
||||
struct pw_global {
|
||||
struct pw_core *core;
|
||||
|
|
@ -49,7 +49,7 @@ struct pw_global {
|
|||
uint32_t version;
|
||||
void *object;
|
||||
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener * listener, struct pw_global * global));
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener *listener, struct pw_global *global));
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -83,12 +83,12 @@ struct pw_core {
|
|||
struct spa_support *support;
|
||||
uint32_t n_support;
|
||||
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener * listener, struct pw_core * core));
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener *listener, struct pw_core *core));
|
||||
|
||||
PW_SIGNAL(global_added, (struct pw_listener * listener,
|
||||
struct pw_core * core, struct pw_global * global));
|
||||
PW_SIGNAL(global_removed, (struct pw_listener * listener,
|
||||
struct pw_core * core, struct pw_global * global));
|
||||
PW_SIGNAL(global_added, (struct pw_listener *listener,
|
||||
struct pw_core *core, struct pw_global *global));
|
||||
PW_SIGNAL(global_removed, (struct pw_listener *listener,
|
||||
struct pw_core *core, struct pw_global *global));
|
||||
};
|
||||
|
||||
struct pw_core *
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ extern "C" {
|
|||
struct pw_data_loop {
|
||||
struct pw_loop *loop;
|
||||
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener * listener, struct pw_data_loop * loop));
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener *listener, struct pw_data_loop *loop));
|
||||
};
|
||||
|
||||
struct pw_data_loop *
|
||||
|
|
|
|||
|
|
@ -201,8 +201,9 @@ static struct spa_buffer **alloc_buffers(struct pw_link *this,
|
|||
uint32_t n_params,
|
||||
struct spa_param **params,
|
||||
uint32_t n_datas,
|
||||
size_t * data_sizes,
|
||||
ssize_t * data_strides, struct pw_memblock *mem)
|
||||
size_t *data_sizes,
|
||||
ssize_t *data_strides,
|
||||
struct pw_memblock *mem)
|
||||
{
|
||||
struct spa_buffer **buffers, *bp;
|
||||
uint32_t i;
|
||||
|
|
@ -789,7 +790,7 @@ bool pw_link_activate(struct pw_link *this)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool pw_link_deactivate(struct pw_link * this)
|
||||
bool pw_link_deactivate(struct pw_link *this)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ struct pw_link {
|
|||
|
||||
enum pw_link_state state;
|
||||
char *error;
|
||||
PW_SIGNAL(state_changed, (struct pw_listener * listener,
|
||||
struct pw_link * link,
|
||||
PW_SIGNAL(state_changed, (struct pw_listener *listener,
|
||||
struct pw_link *link,
|
||||
enum pw_link_state old, enum pw_link_state state));
|
||||
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener *, struct pw_link *));
|
||||
|
|
@ -59,8 +59,8 @@ struct pw_link {
|
|||
struct spa_list output_link;
|
||||
struct pw_port *input;
|
||||
struct spa_list input_link;
|
||||
PW_SIGNAL(port_unlinked, (struct pw_listener * listener,
|
||||
struct pw_link * link, struct pw_port * port));
|
||||
PW_SIGNAL(port_unlinked, (struct pw_listener *listener,
|
||||
struct pw_link *link, struct pw_port *port));
|
||||
|
||||
struct {
|
||||
uint32_t in_ready;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ extern "C" {
|
|||
struct pw_main_loop {
|
||||
struct pw_loop *loop;
|
||||
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener * listener, struct pw_main_loop * loop));
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener *listener, struct pw_main_loop *loop));
|
||||
};
|
||||
|
||||
struct pw_main_loop *
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ struct pw_module {
|
|||
|
||||
void *user_data;
|
||||
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener * listener, struct pw_module * module));
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener *listener, struct pw_module *module));
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -49,7 +49,7 @@ struct pw_module {
|
|||
*
|
||||
* Returns: %true on success, %false otherwise
|
||||
*/
|
||||
typedef bool (*pw_module_init_func_t) (struct pw_module * module, char *args);
|
||||
typedef bool (*pw_module_init_func_t) (struct pw_module *module, char *args);
|
||||
|
||||
struct pw_module *
|
||||
pw_module_load(struct pw_core *core,
|
||||
|
|
|
|||
|
|
@ -42,9 +42,9 @@ struct pw_node_factory {
|
|||
|
||||
const char *name;
|
||||
|
||||
struct pw_node *(*create_node) (struct pw_node_factory * factory,
|
||||
struct pw_client * client,
|
||||
const char *name, struct pw_properties * properties);
|
||||
struct pw_node *(*create_node) (struct pw_node_factory *factory,
|
||||
struct pw_client *client,
|
||||
const char *name, struct pw_properties *properties);
|
||||
};
|
||||
|
||||
#define pw_node_factory_create_node(f,...) (f)->create_node((f),__VA_ARGS__)
|
||||
|
|
|
|||
|
|
@ -54,10 +54,10 @@ struct pw_node {
|
|||
struct pw_properties *properties;
|
||||
enum pw_node_state state;
|
||||
char *error;
|
||||
PW_SIGNAL(state_request, (struct pw_listener * listener,
|
||||
struct pw_node * object, enum pw_node_state state));
|
||||
PW_SIGNAL(state_changed, (struct pw_listener * listener,
|
||||
struct pw_node * object,
|
||||
PW_SIGNAL(state_request, (struct pw_listener *listener,
|
||||
struct pw_node *object, enum pw_node_state state));
|
||||
PW_SIGNAL(state_changed, (struct pw_listener *listener,
|
||||
struct pw_node *object,
|
||||
enum pw_node_state old, enum pw_node_state state));
|
||||
|
||||
struct spa_handle *handle;
|
||||
|
|
@ -67,7 +67,7 @@ struct pw_node {
|
|||
|
||||
struct spa_list resource_list;
|
||||
|
||||
PW_SIGNAL(initialized, (struct pw_listener * listener, struct pw_node * object));
|
||||
PW_SIGNAL(initialized, (struct pw_listener *listener, struct pw_node *object));
|
||||
|
||||
uint32_t max_input_ports;
|
||||
uint32_t n_input_ports;
|
||||
|
|
@ -81,19 +81,19 @@ struct pw_node {
|
|||
struct pw_port **output_port_map;
|
||||
uint32_t n_used_output_links;
|
||||
|
||||
PW_SIGNAL(port_added, (struct pw_listener * listener,
|
||||
struct pw_node * node, struct pw_port * port));
|
||||
PW_SIGNAL(port_removed, (struct pw_listener * listener,
|
||||
struct pw_node * node, struct pw_port * port));
|
||||
PW_SIGNAL(port_added, (struct pw_listener *listener,
|
||||
struct pw_node *node, struct pw_port *port));
|
||||
PW_SIGNAL(port_removed, (struct pw_listener *listener,
|
||||
struct pw_node *node, struct pw_port *port));
|
||||
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener * listener, struct pw_node * object));
|
||||
PW_SIGNAL(free_signal, (struct pw_listener * listener, struct pw_node * object));
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener *listener, struct pw_node *object));
|
||||
PW_SIGNAL(free_signal, (struct pw_listener *listener, struct pw_node *object));
|
||||
|
||||
PW_SIGNAL(async_complete, (struct pw_listener * listener,
|
||||
struct pw_node * node, uint32_t seq, int res));
|
||||
PW_SIGNAL(async_complete, (struct pw_listener *listener,
|
||||
struct pw_node *node, uint32_t seq, int res));
|
||||
|
||||
struct pw_data_loop *data_loop;
|
||||
PW_SIGNAL(loop_changed, (struct pw_listener * listener, struct pw_node * object));
|
||||
PW_SIGNAL(loop_changed, (struct pw_listener *listener, struct pw_node *object));
|
||||
};
|
||||
|
||||
struct pw_node *
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ enum pw_port_state {
|
|||
struct pw_port {
|
||||
struct spa_list link;
|
||||
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener * listener, struct pw_port *));
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener *listener, struct pw_port *));
|
||||
|
||||
struct pw_node *node;
|
||||
enum pw_direction direction;
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ struct pw_resource {
|
|||
const struct pw_interface *iface;
|
||||
const void *implementation;
|
||||
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener * listener, struct pw_resource * resource));
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener *listener, struct pw_resource *resource));
|
||||
};
|
||||
|
||||
struct pw_resource *
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ typedef void (*pw_work_func_t) (void *obj, void *data, int res, uint32_t id);
|
|||
struct pw_work_queue {
|
||||
struct pw_loop *loop;
|
||||
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener * listener, struct pw_work_queue * queue));
|
||||
PW_SIGNAL(destroy_signal, (struct pw_listener *listener, struct pw_work_queue *queue));
|
||||
};
|
||||
|
||||
struct pw_work_queue *
|
||||
|
|
@ -60,4 +60,4 @@ pw_work_queue_complete(struct pw_work_queue *queue, void *obj, uint32_t seq, int
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif /* __PIPEWIRE_WORK_QUEUE_H__ */
|
||||
#endif /* __PIPEWIRE_WORK_QUEUE_H__ */
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ struct spa_log {
|
|||
*
|
||||
* Log a message with the given log level.
|
||||
*/
|
||||
void (*log) (struct spa_log * log,
|
||||
void (*log) (struct spa_log *log,
|
||||
enum spa_log_level level,
|
||||
const char *file,
|
||||
int line,
|
||||
|
|
@ -95,7 +95,7 @@ struct spa_log {
|
|||
*
|
||||
* Log a message with the given log level.
|
||||
*/
|
||||
void (*logv) (struct spa_log * log,
|
||||
void (*logv) (struct spa_log *log,
|
||||
enum spa_log_level level,
|
||||
const char *file,
|
||||
int line,
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ enum spa_io {
|
|||
|
||||
struct spa_source;
|
||||
|
||||
typedef void (*spa_source_func_t) (struct spa_source * source);
|
||||
typedef void (*spa_source_func_t) (struct spa_source *source);
|
||||
|
||||
struct spa_source {
|
||||
struct spa_loop *loop;
|
||||
|
|
@ -58,7 +58,7 @@ struct spa_source {
|
|||
enum spa_io rmask;
|
||||
};
|
||||
|
||||
typedef int (*spa_invoke_func_t) (struct spa_loop * loop,
|
||||
typedef int (*spa_invoke_func_t) (struct spa_loop *loop,
|
||||
bool async,
|
||||
uint32_t seq,
|
||||
size_t size,
|
||||
|
|
@ -81,7 +81,7 @@ struct spa_loop {
|
|||
|
||||
void (*remove_source) (struct spa_source *source);
|
||||
|
||||
int (*invoke) (struct spa_loop * loop,
|
||||
int (*invoke) (struct spa_loop *loop,
|
||||
spa_invoke_func_t func,
|
||||
uint32_t seq,
|
||||
size_t size,
|
||||
|
|
@ -94,7 +94,7 @@ struct spa_loop {
|
|||
#define spa_loop_remove_source(l,...) (l)->remove_source(__VA_ARGS__)
|
||||
#define spa_loop_invoke(l,...) (l)->invoke((l),__VA_ARGS__)
|
||||
|
||||
typedef void (*spa_loop_hook_t) (struct spa_loop_control * ctrl, void *data);
|
||||
typedef void (*spa_loop_hook_t) (struct spa_loop_control *ctrl, void *data);
|
||||
|
||||
/**
|
||||
* spa_loop_control:
|
||||
|
|
@ -126,17 +126,17 @@ struct spa_loop_control {
|
|||
#define spa_loop_control_leave(l) (l)->leave(l)
|
||||
|
||||
|
||||
typedef void (*spa_source_io_func_t) (struct spa_loop_utils * utils,
|
||||
struct spa_source * source,
|
||||
typedef void (*spa_source_io_func_t) (struct spa_loop_utils *utils,
|
||||
struct spa_source *source,
|
||||
int fd, enum spa_io mask, void *data);
|
||||
typedef void (*spa_source_idle_func_t) (struct spa_loop_utils * utils,
|
||||
struct spa_source * source, void *data);
|
||||
typedef void (*spa_source_event_func_t) (struct spa_loop_utils * utils,
|
||||
struct spa_source * source, void *data);
|
||||
typedef void (*spa_source_timer_func_t) (struct spa_loop_utils * utils,
|
||||
struct spa_source * source, void *data);
|
||||
typedef void (*spa_source_signal_func_t) (struct spa_loop_utils * utils,
|
||||
struct spa_source * source,
|
||||
typedef void (*spa_source_idle_func_t) (struct spa_loop_utils *utils,
|
||||
struct spa_source *source, void *data);
|
||||
typedef void (*spa_source_event_func_t) (struct spa_loop_utils *utils,
|
||||
struct spa_source *source, void *data);
|
||||
typedef void (*spa_source_timer_func_t) (struct spa_loop_utils *utils,
|
||||
struct spa_source *source, void *data);
|
||||
typedef void (*spa_source_signal_func_t) (struct spa_loop_utils *utils,
|
||||
struct spa_source *source,
|
||||
int signal_number, void *data);
|
||||
|
||||
/**
|
||||
|
|
@ -149,34 +149,34 @@ struct spa_loop_utils {
|
|||
* structure in the future */
|
||||
size_t size;
|
||||
|
||||
struct spa_source *(*add_io) (struct spa_loop_utils * utils,
|
||||
struct spa_source *(*add_io) (struct spa_loop_utils *utils,
|
||||
int fd,
|
||||
enum spa_io mask,
|
||||
bool close,
|
||||
spa_source_io_func_t func, void *data);
|
||||
|
||||
int (*update_io) (struct spa_source * source, enum spa_io mask);
|
||||
int (*update_io) (struct spa_source *source, enum spa_io mask);
|
||||
|
||||
struct spa_source *(*add_idle) (struct spa_loop_utils * utils,
|
||||
struct spa_source *(*add_idle) (struct spa_loop_utils *utils,
|
||||
bool enabled,
|
||||
spa_source_idle_func_t func, void *data);
|
||||
void (*enable_idle) (struct spa_source * source, bool enabled);
|
||||
void (*enable_idle) (struct spa_source *source, bool enabled);
|
||||
|
||||
struct spa_source *(*add_event) (struct spa_loop_utils * utils,
|
||||
struct spa_source *(*add_event) (struct spa_loop_utils *utils,
|
||||
spa_source_event_func_t func, void *data);
|
||||
void (*signal_event) (struct spa_source * source);
|
||||
void (*signal_event) (struct spa_source *source);
|
||||
|
||||
struct spa_source *(*add_timer) (struct spa_loop_utils * utils,
|
||||
struct spa_source *(*add_timer) (struct spa_loop_utils *utils,
|
||||
spa_source_timer_func_t func, void *data);
|
||||
int (*update_timer) (struct spa_source * source,
|
||||
struct timespec * value,
|
||||
struct timespec * interval,
|
||||
int (*update_timer) (struct spa_source *source,
|
||||
struct timespec *value,
|
||||
struct timespec *interval,
|
||||
bool absolute);
|
||||
struct spa_source *(*add_signal) (struct spa_loop_utils * utils,
|
||||
struct spa_source *(*add_signal) (struct spa_loop_utils *utils,
|
||||
int signal_number,
|
||||
spa_source_signal_func_t func, void *data);
|
||||
|
||||
void (*destroy_source) (struct spa_source * source);
|
||||
void (*destroy_source) (struct spa_source *source);
|
||||
};
|
||||
|
||||
#define spa_loop_utils_add_io(l,...) (l)->add_io(l,__VA_ARGS__)
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ enum spa_monitor_item_state {
|
|||
* spa_monitor_callbacks:
|
||||
*/
|
||||
struct spa_monitor_callbacks {
|
||||
void (*event) (struct spa_monitor * monitor, struct spa_event * event, void *user_data);
|
||||
void (*event) (struct spa_monitor *monitor, struct spa_event *event, void *user_data);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -139,12 +139,12 @@ struct spa_monitor {
|
|||
*
|
||||
* Returns: #SPA_RESULT_OK on success
|
||||
*/
|
||||
int (*set_callbacks) (struct spa_monitor * monitor,
|
||||
const struct spa_monitor_callbacks * callbacks,
|
||||
int (*set_callbacks) (struct spa_monitor *monitor,
|
||||
const struct spa_monitor_callbacks *callbacks,
|
||||
size_t callbacks_size, void *user_data);
|
||||
|
||||
int (*enum_items) (struct spa_monitor * monitor,
|
||||
struct spa_monitor_item ** item, uint32_t index);
|
||||
int (*enum_items) (struct spa_monitor *monitor,
|
||||
struct spa_monitor_item **item, uint32_t index);
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ struct spa_node_callbacks {
|
|||
* This will be called when an out-of-bound event is notified
|
||||
* on @node. the callback can be called from any thread.
|
||||
*/
|
||||
void (*event) (struct spa_node * node, struct spa_event * event, void *user_data);
|
||||
void (*event) (struct spa_node *node, struct spa_event *event, void *user_data);
|
||||
/**
|
||||
* struct spa_node_callbacks::need_input:
|
||||
* @node: a #struct spa_node
|
||||
|
|
@ -103,7 +103,7 @@ struct spa_node_callbacks {
|
|||
* When this function is NULL, synchronous operation is requested
|
||||
* on the input ports.
|
||||
*/
|
||||
void (*need_input) (struct spa_node * node, void *user_data);
|
||||
void (*need_input) (struct spa_node *node, void *user_data);
|
||||
/**
|
||||
* struct spa_node_callbacks::have_output:
|
||||
* @node: a #struct spa_node
|
||||
|
|
@ -115,7 +115,7 @@ struct spa_node_callbacks {
|
|||
* When this function is NULL, synchronous operation is requested
|
||||
* on the output ports.
|
||||
*/
|
||||
void (*have_output) (struct spa_node * node, void *user_data);
|
||||
void (*have_output) (struct spa_node *node, void *user_data);
|
||||
/**
|
||||
* struct spa_node_callbacks::reuse_buffer:
|
||||
* @node: a #struct spa_node
|
||||
|
|
@ -129,7 +129,7 @@ struct spa_node_callbacks {
|
|||
* When this function is NULL, the buffers to reuse will be set in
|
||||
* the io area or the input ports.
|
||||
*/
|
||||
void (*reuse_buffer) (struct spa_node * node,
|
||||
void (*reuse_buffer) (struct spa_node *node,
|
||||
uint32_t port_id,
|
||||
uint32_t buffer_id, void *user_data);
|
||||
};
|
||||
|
|
@ -170,7 +170,7 @@ struct spa_node {
|
|||
* #SPA_RESULT_NOT_IMPLEMENTED when there are no properties
|
||||
* implemented on @node
|
||||
*/
|
||||
int (*get_props) (struct spa_node * node, struct spa_props ** props);
|
||||
int (*get_props) (struct spa_node *node, struct spa_props **props);
|
||||
/**
|
||||
* struct spa_node::set_props:
|
||||
* @node: a #struct spa_node
|
||||
|
|
@ -195,7 +195,7 @@ struct spa_node {
|
|||
* #SPA_RESULT_WRONG_PROPERTY_TYPE when a property has the wrong
|
||||
* type.
|
||||
*/
|
||||
int (*set_props) (struct spa_node * node, const struct spa_props * props);
|
||||
int (*set_props) (struct spa_node *node, const struct spa_props *props);
|
||||
/**
|
||||
* struct spa_node::send_command:
|
||||
* @node: a #struct spa_node
|
||||
|
|
@ -213,7 +213,7 @@ struct spa_node {
|
|||
* #SPA_RESULT_INVALID_COMMAND @command is an invalid command
|
||||
* #SPA_RESULT_ASYNC @command is executed asynchronously
|
||||
*/
|
||||
int (*send_command) (struct spa_node * node, struct spa_command * command);
|
||||
int (*send_command) (struct spa_node *node, struct spa_command *command);
|
||||
/**
|
||||
* struct spa_node::set_event_callback:
|
||||
* @node: a #struct spa_node
|
||||
|
|
@ -229,8 +229,8 @@ struct spa_node {
|
|||
* Returns: #SPA_RESULT_OK on success
|
||||
* #SPA_RESULT_INVALID_ARGUMENTS when node is %NULL
|
||||
*/
|
||||
int (*set_callbacks) (struct spa_node * node,
|
||||
const struct spa_node_callbacks * callbacks,
|
||||
int (*set_callbacks) (struct spa_node *node,
|
||||
const struct spa_node_callbacks *callbacks,
|
||||
size_t callbacks_size,
|
||||
void *user_data);
|
||||
/**
|
||||
|
|
@ -249,11 +249,11 @@ struct spa_node {
|
|||
* Returns: #SPA_RESULT_OK on success
|
||||
* #SPA_RESULT_INVALID_ARGUMENTS when node is %NULL
|
||||
*/
|
||||
int (*get_n_ports) (struct spa_node * node,
|
||||
uint32_t * n_input_ports,
|
||||
uint32_t * max_input_ports,
|
||||
uint32_t * n_output_ports,
|
||||
uint32_t * max_output_ports);
|
||||
int (*get_n_ports) (struct spa_node *node,
|
||||
uint32_t *n_input_ports,
|
||||
uint32_t *max_input_ports,
|
||||
uint32_t *n_output_ports,
|
||||
uint32_t *max_output_ports);
|
||||
/**
|
||||
* struct spa_node::get_port_ids:
|
||||
* @node: a #struct spa_node
|
||||
|
|
@ -269,11 +269,11 @@ struct spa_node {
|
|||
* Returns: #SPA_RESULT_OK on success
|
||||
* #SPA_RESULT_INVALID_ARGUMENTS when node is %NULL
|
||||
*/
|
||||
int (*get_port_ids) (struct spa_node * node,
|
||||
int (*get_port_ids) (struct spa_node *node,
|
||||
uint32_t n_input_ports,
|
||||
uint32_t * input_ids,
|
||||
uint32_t *input_ids,
|
||||
uint32_t n_output_ports,
|
||||
uint32_t * output_ids);
|
||||
uint32_t *output_ids);
|
||||
|
||||
/**
|
||||
* struct spa_node::add_port:
|
||||
|
|
@ -291,8 +291,8 @@ struct spa_node {
|
|||
* Returns: #SPA_RESULT_OK on success
|
||||
* #SPA_RESULT_INVALID_ARGUMENTS when node is %NULL
|
||||
*/
|
||||
int (*add_port) (struct spa_node * node, enum spa_direction direction, uint32_t port_id);
|
||||
int (*remove_port) (struct spa_node * node, enum spa_direction direction, uint32_t port_id);
|
||||
int (*add_port) (struct spa_node *node, enum spa_direction direction, uint32_t port_id);
|
||||
int (*remove_port) (struct spa_node *node, enum spa_direction direction, uint32_t port_id);
|
||||
|
||||
/**
|
||||
* struct spa_node::port_enum_formats:
|
||||
|
|
@ -321,11 +321,11 @@ struct spa_node {
|
|||
* #SPA_RESULT_INVALID_PORT when port_id is not valid
|
||||
* #SPA_RESULT_ENUM_END when no format exists
|
||||
*/
|
||||
int (*port_enum_formats) (struct spa_node * node,
|
||||
int (*port_enum_formats) (struct spa_node *node,
|
||||
enum spa_direction direction,
|
||||
uint32_t port_id,
|
||||
struct spa_format ** format,
|
||||
const struct spa_format * filter,
|
||||
struct spa_format **format,
|
||||
const struct spa_format *filter,
|
||||
uint32_t index);
|
||||
/**
|
||||
* struct spa_node::port_set_format:
|
||||
|
|
@ -364,11 +364,11 @@ struct spa_node {
|
|||
#define SPA_PORT_FORMAT_FLAG_FIXATE (1 << 1) /* fixate the non-optional unset fields */
|
||||
#define SPA_PORT_FORMAT_FLAG_NEAREST (1 << 2) /* allow set fields to be rounded to the
|
||||
* nearest allowed field value. */
|
||||
int (*port_set_format) (struct spa_node * node,
|
||||
int (*port_set_format) (struct spa_node *node,
|
||||
enum spa_direction direction,
|
||||
uint32_t port_id,
|
||||
uint32_t flags,
|
||||
const struct spa_format * format);
|
||||
const struct spa_format *format);
|
||||
/**
|
||||
* struct spa_node::port_get_format:
|
||||
* @node: a #struct spa_node
|
||||
|
|
@ -386,25 +386,25 @@ struct spa_node {
|
|||
* #SPA_RESULT_INVALID_PORT when @port_id is not valid
|
||||
* #SPA_RESULT_INVALID_NO_FORMAT when no format was set
|
||||
*/
|
||||
int (*port_get_format) (struct spa_node * node,
|
||||
int (*port_get_format) (struct spa_node *node,
|
||||
enum spa_direction direction,
|
||||
uint32_t port_id,
|
||||
const struct spa_format ** format);
|
||||
const struct spa_format **format);
|
||||
|
||||
int (*port_get_info) (struct spa_node * node,
|
||||
int (*port_get_info) (struct spa_node *node,
|
||||
enum spa_direction direction,
|
||||
uint32_t port_id,
|
||||
const struct spa_port_info ** info);
|
||||
const struct spa_port_info **info);
|
||||
|
||||
int (*port_enum_params) (struct spa_node * node,
|
||||
int (*port_enum_params) (struct spa_node *node,
|
||||
enum spa_direction direction,
|
||||
uint32_t port_id,
|
||||
uint32_t index,
|
||||
struct spa_param ** param);
|
||||
int (*port_set_param) (struct spa_node * node,
|
||||
struct spa_param **param);
|
||||
int (*port_set_param) (struct spa_node *node,
|
||||
enum spa_direction direction,
|
||||
uint32_t port_id,
|
||||
const struct spa_param * param);
|
||||
const struct spa_param *param);
|
||||
|
||||
/**
|
||||
* struct spa_node::port_use_buffers:
|
||||
|
|
@ -436,10 +436,10 @@ struct spa_node {
|
|||
* Returns: #SPA_RESULT_OK on success
|
||||
* #SPA_RESULT_ASYNC the function is executed asynchronously
|
||||
*/
|
||||
int (*port_use_buffers) (struct spa_node * node,
|
||||
int (*port_use_buffers) (struct spa_node *node,
|
||||
enum spa_direction direction,
|
||||
uint32_t port_id,
|
||||
struct spa_buffer ** buffers,
|
||||
struct spa_buffer **buffers,
|
||||
uint32_t n_buffers);
|
||||
/**
|
||||
* struct spa_node::port_alloc_buffers:
|
||||
|
|
@ -476,13 +476,13 @@ struct spa_node {
|
|||
* #SPA_RESULT_ERROR when the node already has allocated buffers.
|
||||
* #SPA_RESULT_ASYNC the function is executed asynchronously
|
||||
*/
|
||||
int (*port_alloc_buffers) (struct spa_node * node,
|
||||
int (*port_alloc_buffers) (struct spa_node *node,
|
||||
enum spa_direction direction,
|
||||
uint32_t port_id,
|
||||
struct spa_param ** params,
|
||||
struct spa_param **params,
|
||||
uint32_t n_params,
|
||||
struct spa_buffer ** buffers,
|
||||
uint32_t * n_buffers);
|
||||
struct spa_buffer **buffers,
|
||||
uint32_t *n_buffers);
|
||||
|
||||
/**
|
||||
* struct spa_node::port_set_io:
|
||||
|
|
@ -498,10 +498,10 @@ struct spa_node {
|
|||
*
|
||||
* Returns: #SPA_RESULT_OK on success
|
||||
*/
|
||||
int (*port_set_io) (struct spa_node * node,
|
||||
int (*port_set_io) (struct spa_node *node,
|
||||
enum spa_direction direction,
|
||||
uint32_t port_id,
|
||||
struct spa_port_io * io);
|
||||
struct spa_port_io *io);
|
||||
|
||||
/**
|
||||
* struct spa_node::port_reuse_buffer:
|
||||
|
|
@ -516,12 +516,12 @@ struct spa_node {
|
|||
* Returns: #SPA_RESULT_OK on success
|
||||
* #SPA_RESULT_INVALID_ARGUMENTS when node is %NULL
|
||||
*/
|
||||
int (*port_reuse_buffer) (struct spa_node * node, uint32_t port_id, uint32_t buffer_id);
|
||||
int (*port_reuse_buffer) (struct spa_node *node, uint32_t port_id, uint32_t buffer_id);
|
||||
|
||||
int (*port_send_command) (struct spa_node * node,
|
||||
int (*port_send_command) (struct spa_node *node,
|
||||
enum spa_direction direction,
|
||||
uint32_t port_id,
|
||||
struct spa_command * command);
|
||||
struct spa_command *command);
|
||||
/**
|
||||
* struct spa_node::process_input:
|
||||
* @node: a #struct spa_node
|
||||
|
|
@ -560,7 +560,7 @@ struct spa_node {
|
|||
* can be consumed.
|
||||
* #SPA_RESULT_ERROR when one of the inputs is in error
|
||||
*/
|
||||
int (*process_input) (struct spa_node * node);
|
||||
int (*process_input) (struct spa_node *node);
|
||||
|
||||
/**
|
||||
* struct spa_node::process_output:
|
||||
|
|
@ -594,7 +594,7 @@ struct spa_node {
|
|||
* is needed.
|
||||
* #SPA_RESULT_ERROR when one of the outputs is in error
|
||||
*/
|
||||
int (*process_output) (struct spa_node * node);
|
||||
int (*process_output) (struct spa_node *node);
|
||||
};
|
||||
|
||||
#define spa_node_get_props(n,...) (n)->get_props((n),__VA_ARGS__)
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ struct spa_handle {
|
|||
* #SPA_RESULT_NOT_IMPLEMENTED when there are no extensions
|
||||
* #SPA_RESULT_INVALID_ARGUMENTS when handle or info is %NULL
|
||||
*/
|
||||
int (*get_interface) (struct spa_handle * handle, uint32_t interface_id, void **interface);
|
||||
int (*get_interface) (struct spa_handle *handle, uint32_t interface_id, void **interface);
|
||||
/**
|
||||
* spa_handle::clear
|
||||
* @handle: a pointer to memory
|
||||
|
|
@ -55,7 +55,7 @@ struct spa_handle {
|
|||
*
|
||||
* Returns: #SPA_RESULT_OK on success
|
||||
*/
|
||||
int (*clear) (struct spa_handle * handle);
|
||||
int (*clear) (struct spa_handle *handle);
|
||||
};
|
||||
|
||||
#define spa_handle_get_interface(h,...) (h)->get_interface((h),__VA_ARGS__)
|
||||
|
|
@ -124,10 +124,10 @@ struct spa_handle_factory {
|
|||
* #SPA_RESULT_NOT_IMPLEMENTED when an instance can't be made
|
||||
* #SPA_RESULT_INVALID_ARGUMENTS when factory or handle are %NULL
|
||||
*/
|
||||
int (*init) (const struct spa_handle_factory * factory,
|
||||
struct spa_handle * handle,
|
||||
const struct spa_dict * info,
|
||||
const struct spa_support * support,
|
||||
int (*init) (const struct spa_handle_factory *factory,
|
||||
struct spa_handle *handle,
|
||||
const struct spa_dict *info,
|
||||
const struct spa_support *support,
|
||||
uint32_t n_support);
|
||||
|
||||
/**
|
||||
|
|
@ -143,8 +143,8 @@ struct spa_handle_factory {
|
|||
* #SPA_RESULT_INVALID_ARGUMENTS when handle or info is %NULL
|
||||
* #SPA_RESULT_ENUM_END when there are no more infos
|
||||
*/
|
||||
int (*enum_interface_info) (const struct spa_handle_factory * factory,
|
||||
const struct spa_interface_info ** info,
|
||||
int (*enum_interface_info) (const struct spa_handle_factory *factory,
|
||||
const struct spa_interface_info **info,
|
||||
uint32_t index);
|
||||
};
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ struct spa_handle_factory {
|
|||
* #SPA_RESULT_INVALID_ARGUMENTS when factory is %NULL
|
||||
* #SPA_RESULT_ENUM_END when there are no more factories
|
||||
*/
|
||||
typedef int (*spa_handle_factory_enum_func_t) (const struct spa_handle_factory ** factory,
|
||||
typedef int (*spa_handle_factory_enum_func_t) (const struct spa_handle_factory **factory,
|
||||
uint32_t index);
|
||||
|
||||
#define SPA_HANDLE_FACTORY_ENUM_FUNC_NAME "spa_handle_factory_enum"
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ struct spa_pod_builder {
|
|||
uint32_t size;
|
||||
uint32_t offset;
|
||||
struct spa_pod_frame *stack;
|
||||
uint32_t (*write) (struct spa_pod_builder * builder, uint32_t ref, const void *data,
|
||||
uint32_t (*write) (struct spa_pod_builder *builder, uint32_t ref, const void *data,
|
||||
uint32_t size);
|
||||
bool in_array;
|
||||
bool first;
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ static inline void spa_ringbuffer_clear(struct spa_ringbuffer *rbuf)
|
|||
* there was an underrun. values > rbuf->size means there
|
||||
* was an overrun.
|
||||
*/
|
||||
static inline int32_t spa_ringbuffer_get_read_index(struct spa_ringbuffer *rbuf, uint32_t * index)
|
||||
static inline int32_t spa_ringbuffer_get_read_index(struct spa_ringbuffer *rbuf, uint32_t *index)
|
||||
{
|
||||
int32_t avail;
|
||||
|
||||
|
|
@ -147,7 +147,7 @@ static inline void spa_ringbuffer_read_update(struct spa_ringbuffer *rbuf, int32
|
|||
* was an overrun. Subtract from the buffer size to get
|
||||
* the number of bytes available for writing.
|
||||
*/
|
||||
static inline int32_t spa_ringbuffer_get_write_index(struct spa_ringbuffer *rbuf, uint32_t * index)
|
||||
static inline int32_t spa_ringbuffer_get_write_index(struct spa_ringbuffer *rbuf, uint32_t *index)
|
||||
{
|
||||
int32_t filled;
|
||||
|
||||
|
|
|
|||
|
|
@ -46,11 +46,11 @@ struct spa_type_map {
|
|||
*/
|
||||
const struct spa_dict *info;
|
||||
|
||||
uint32_t (*get_id) (struct spa_type_map * map, const char *type);
|
||||
uint32_t (*get_id) (struct spa_type_map *map, const char *type);
|
||||
|
||||
const char *(*get_type) (const struct spa_type_map * map, uint32_t id);
|
||||
const char *(*get_type) (const struct spa_type_map *map, uint32_t id);
|
||||
|
||||
size_t (*get_size) (const struct spa_type_map * map);
|
||||
size_t (*get_size) (const struct spa_type_map *map);
|
||||
};
|
||||
|
||||
#define spa_type_map_get_id(n,...) (n)->get_id((n),__VA_ARGS__)
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ static const char *path_get_card_id(const char *path)
|
|||
}
|
||||
|
||||
static int
|
||||
fill_item(struct impl *this, snd_ctl_card_info_t * card_info, snd_pcm_info_t * dev_info, struct udev_device *dev)
|
||||
fill_item(struct impl *this, snd_ctl_card_info_t *card_info, snd_pcm_info_t *dev_info, struct udev_device *dev)
|
||||
{
|
||||
const char *str, *name, *klass = NULL;
|
||||
struct spa_pod_builder b = SPA_POD_BUILDER_INIT(this->item_buffer, sizeof(this->item_buffer));
|
||||
|
|
|
|||
|
|
@ -470,7 +470,9 @@ impl_node_port_alloc_buffers(struct spa_node *node,
|
|||
enum spa_direction direction,
|
||||
uint32_t port_id,
|
||||
struct spa_param **params,
|
||||
uint32_t n_params, struct spa_buffer **buffers, uint32_t * n_buffers)
|
||||
uint32_t n_params,
|
||||
struct spa_buffer **buffers,
|
||||
uint32_t *n_buffers)
|
||||
{
|
||||
struct state *this;
|
||||
|
||||
|
|
|
|||
|
|
@ -184,8 +184,10 @@ impl_node_set_callbacks(struct spa_node *node,
|
|||
|
||||
static int
|
||||
impl_node_get_n_ports(struct spa_node *node,
|
||||
uint32_t * n_input_ports,
|
||||
uint32_t * max_input_ports, uint32_t * n_output_ports, uint32_t * max_output_ports)
|
||||
uint32_t *n_input_ports,
|
||||
uint32_t *max_input_ports,
|
||||
uint32_t *n_output_ports,
|
||||
uint32_t *max_output_ports)
|
||||
{
|
||||
spa_return_val_if_fail(node != NULL, SPA_RESULT_INVALID_ARGUMENTS);
|
||||
|
||||
|
|
@ -203,7 +205,10 @@ impl_node_get_n_ports(struct spa_node *node,
|
|||
|
||||
static int
|
||||
impl_node_get_port_ids(struct spa_node *node,
|
||||
uint32_t n_input_ports, uint32_t * input_ids, uint32_t n_output_ports, uint32_t * output_ids)
|
||||
uint32_t n_input_ports,
|
||||
uint32_t *input_ids,
|
||||
uint32_t n_output_ports,
|
||||
uint32_t *output_ids)
|
||||
{
|
||||
spa_return_val_if_fail(node != NULL, SPA_RESULT_INVALID_ARGUMENTS);
|
||||
|
||||
|
|
@ -467,7 +472,9 @@ impl_node_port_alloc_buffers(struct spa_node *node,
|
|||
enum spa_direction direction,
|
||||
uint32_t port_id,
|
||||
struct spa_param **params,
|
||||
uint32_t n_params, struct spa_buffer **buffers, uint32_t * n_buffers)
|
||||
uint32_t n_params,
|
||||
struct spa_buffer **buffers,
|
||||
uint32_t *n_buffers)
|
||||
{
|
||||
struct state *this;
|
||||
|
||||
|
|
@ -606,7 +613,10 @@ static int impl_clock_set_props(struct spa_clock *clock, const struct spa_props
|
|||
return SPA_RESULT_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static int impl_clock_get_time(struct spa_clock *clock, int32_t * rate, int64_t * ticks, int64_t * monotonic_time)
|
||||
static int impl_clock_get_time(struct spa_clock *clock,
|
||||
int32_t *rate,
|
||||
int64_t *ticks,
|
||||
int64_t *monotonic_time)
|
||||
{
|
||||
struct state *this;
|
||||
|
||||
|
|
|
|||
|
|
@ -311,7 +311,10 @@ static int set_swparams(struct state *state)
|
|||
|
||||
static inline snd_pcm_uframes_t
|
||||
pull_frames(struct state *state,
|
||||
const snd_pcm_channel_area_t * my_areas, snd_pcm_uframes_t offset, snd_pcm_uframes_t frames, bool do_pull)
|
||||
const snd_pcm_channel_area_t *my_areas,
|
||||
snd_pcm_uframes_t offset,
|
||||
snd_pcm_uframes_t frames,
|
||||
bool do_pull)
|
||||
{
|
||||
snd_pcm_uframes_t total_frames = 0, to_write = frames;
|
||||
struct spa_port_io *io = state->io;
|
||||
|
|
@ -384,7 +387,9 @@ pull_frames(struct state *state,
|
|||
|
||||
static snd_pcm_uframes_t
|
||||
push_frames(struct state *state,
|
||||
const snd_pcm_channel_area_t * my_areas, snd_pcm_uframes_t offset, snd_pcm_uframes_t frames)
|
||||
const snd_pcm_channel_area_t *my_areas,
|
||||
snd_pcm_uframes_t offset,
|
||||
snd_pcm_uframes_t frames)
|
||||
{
|
||||
snd_pcm_uframes_t total_frames = 0;
|
||||
struct spa_port_io *io = state->io;
|
||||
|
|
@ -443,7 +448,9 @@ static int alsa_try_resume(struct state *state)
|
|||
return res;
|
||||
}
|
||||
|
||||
static inline void calc_timeout(size_t target, size_t current, size_t rate, snd_htimestamp_t * now, struct timespec *ts)
|
||||
static inline void calc_timeout(size_t target, size_t current,
|
||||
size_t rate, snd_htimestamp_t *now,
|
||||
struct timespec *ts)
|
||||
{
|
||||
ts->tv_sec = now->tv_sec;
|
||||
ts->tv_nsec = now->tv_nsec;
|
||||
|
|
|
|||
|
|
@ -500,7 +500,7 @@ impl_node_port_alloc_buffers(struct spa_node *node,
|
|||
struct spa_param **params,
|
||||
uint32_t n_params,
|
||||
struct spa_buffer **buffers,
|
||||
uint32_t * n_buffers)
|
||||
uint32_t *n_buffers)
|
||||
{
|
||||
return SPA_RESULT_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ struct buffer {
|
|||
|
||||
struct impl;
|
||||
|
||||
typedef int (*render_func_t) (struct impl * this, void *samples, size_t n_samples);
|
||||
typedef int (*render_func_t) (struct impl *this, void *samples, size_t n_samples);
|
||||
|
||||
struct impl {
|
||||
struct spa_handle handle;
|
||||
|
|
@ -768,7 +768,7 @@ impl_node_port_alloc_buffers(struct spa_node *node,
|
|||
struct spa_param **params,
|
||||
uint32_t n_params,
|
||||
struct spa_buffer **buffers,
|
||||
uint32_t * n_buffers)
|
||||
uint32_t *n_buffers)
|
||||
{
|
||||
struct impl *this;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#define DEFINE_SINE(type,scale) \
|
||||
static void \
|
||||
audio_test_src_create_sine_##type (struct impl *this, type * samples, size_t n_samples) \
|
||||
audio_test_src_create_sine_##type (struct impl *this, type *samples, size_t n_samples) \
|
||||
{ \
|
||||
int i, c, channels; \
|
||||
double step, amp; \
|
||||
|
|
|
|||
|
|
@ -130,10 +130,10 @@ spa_ffmpeg_dec_node_set_callbacks(struct spa_node *node,
|
|||
|
||||
static int
|
||||
spa_ffmpeg_dec_node_get_n_ports(struct spa_node *node,
|
||||
uint32_t * n_input_ports,
|
||||
uint32_t * max_input_ports,
|
||||
uint32_t * n_output_ports,
|
||||
uint32_t * max_output_ports)
|
||||
uint32_t *n_input_ports,
|
||||
uint32_t *max_input_ports,
|
||||
uint32_t *n_output_ports,
|
||||
uint32_t *max_output_ports)
|
||||
{
|
||||
if (node == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
|
@ -153,9 +153,9 @@ spa_ffmpeg_dec_node_get_n_ports(struct spa_node *node,
|
|||
static int
|
||||
spa_ffmpeg_dec_node_get_port_ids(struct spa_node *node,
|
||||
uint32_t n_input_ports,
|
||||
uint32_t * input_ids,
|
||||
uint32_t *input_ids,
|
||||
uint32_t n_output_ports,
|
||||
uint32_t * output_ids)
|
||||
uint32_t *output_ids)
|
||||
{
|
||||
if (node == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
|
@ -350,7 +350,7 @@ spa_ffmpeg_dec_node_port_alloc_buffers(struct spa_node *node,
|
|||
struct spa_param **params,
|
||||
uint32_t n_params,
|
||||
struct spa_buffer **buffers,
|
||||
uint32_t * n_buffers)
|
||||
uint32_t *n_buffers)
|
||||
{
|
||||
return SPA_RESULT_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,9 +133,10 @@ spa_ffmpeg_enc_node_set_callbacks(struct spa_node *node,
|
|||
|
||||
static int
|
||||
spa_ffmpeg_enc_node_get_n_ports(struct spa_node *node,
|
||||
uint32_t * n_input_ports,
|
||||
uint32_t * max_input_ports,
|
||||
uint32_t * n_output_ports, uint32_t * max_output_ports)
|
||||
uint32_t *n_input_ports,
|
||||
uint32_t *max_input_ports,
|
||||
uint32_t *n_output_ports,
|
||||
uint32_t *max_output_ports)
|
||||
{
|
||||
if (node == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
|
@ -155,8 +156,9 @@ spa_ffmpeg_enc_node_get_n_ports(struct spa_node *node,
|
|||
static int
|
||||
spa_ffmpeg_enc_node_get_port_ids(struct spa_node *node,
|
||||
uint32_t n_input_ports,
|
||||
uint32_t * input_ids,
|
||||
uint32_t n_output_ports, uint32_t * output_ids)
|
||||
uint32_t *input_ids,
|
||||
uint32_t n_output_ports,
|
||||
uint32_t *output_ids)
|
||||
{
|
||||
if (node == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
|
@ -344,7 +346,8 @@ spa_ffmpeg_enc_node_port_alloc_buffers(struct spa_node *node,
|
|||
uint32_t port_id,
|
||||
struct spa_param **params,
|
||||
uint32_t n_params,
|
||||
struct spa_buffer **buffers, uint32_t * n_buffers)
|
||||
struct spa_buffer **buffers,
|
||||
uint32_t *n_buffers)
|
||||
{
|
||||
return SPA_RESULT_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -616,7 +616,7 @@ impl_node_port_alloc_buffers(struct spa_node *node,
|
|||
struct spa_param **params,
|
||||
uint32_t n_params,
|
||||
struct spa_buffer **buffers,
|
||||
uint32_t * n_buffers)
|
||||
uint32_t *n_buffers)
|
||||
{
|
||||
struct impl *this;
|
||||
|
||||
|
|
|
|||
|
|
@ -1138,7 +1138,7 @@ spa_v4l2_alloc_buffers(struct impl *this,
|
|||
struct spa_param **params,
|
||||
uint32_t n_params,
|
||||
struct spa_buffer **buffers,
|
||||
uint32_t * n_buffers)
|
||||
uint32_t *n_buffers)
|
||||
{
|
||||
int res;
|
||||
struct port *state = &this->out_ports[0];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue