mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-14 06:59:57 -05:00
Implement protocol extensions
Add hooks that contain protocol specific interfaces that can be used to extend the protocol. This makes it possible to add new interfaces to the protocol and implement the protocol specific data transport. Move these protocol specific extension to the extensions directory.
This commit is contained in:
parent
267547c884
commit
465f12241e
43 changed files with 661 additions and 471 deletions
|
|
@ -60,7 +60,7 @@ static const struct spa_graph_node_methods spa_graph_node_scheduler_default = {
|
|||
static inline int spa_graph_port_scheduler_reuse_buffer(struct spa_graph_port *port,
|
||||
uint32_t buffer_id, void *user_data)
|
||||
{
|
||||
printf("port %p reuse buffer %d\n", port, buffer_id);
|
||||
debug("port %p reuse buffer %d\n", port, buffer_id);
|
||||
struct spa_node *node = port->node->user_data;
|
||||
return spa_node_port_reuse_buffer(node, port->port_id, buffer_id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,10 +100,10 @@ struct spa_loop {
|
|||
#define spa_loop_remove_source(l,...) (l)->remove_source(__VA_ARGS__)
|
||||
#define spa_loop_invoke(l,...) (l)->invoke((l),__VA_ARGS__)
|
||||
|
||||
#define SPA_VERSION_LOOP_CONTROL_HOOKS 0
|
||||
|
||||
/** Control hooks */
|
||||
struct spa_loop_control_hooks {
|
||||
#define SPA_VERSION_LOOP_CONTROL_HOOKS 0
|
||||
uint32_t version;
|
||||
|
||||
struct spa_list link;
|
||||
|
|
@ -114,7 +114,6 @@ struct spa_loop_control_hooks {
|
|||
void (*after) (const struct spa_loop_control_hooks *hooks);
|
||||
};
|
||||
|
||||
#define SPA_VERSION_LOOP_CONTROL 0
|
||||
|
||||
/**
|
||||
* spa_loop_control:
|
||||
|
|
@ -124,14 +123,14 @@ struct spa_loop_control_hooks {
|
|||
struct spa_loop_control {
|
||||
/* the version of this structure. This can be used to expand this
|
||||
* structure in the future */
|
||||
#define SPA_VERSION_LOOP_CONTROL 0
|
||||
uint32_t version;
|
||||
|
||||
int (*get_fd) (struct spa_loop_control *ctrl);
|
||||
|
||||
/** Add a hook
|
||||
* \param ctrl the control to change
|
||||
* \param hooks the new hooks
|
||||
* \param old location to store previous hooks */
|
||||
* \param hooks the hooks to add */
|
||||
void (*add_hooks) (struct spa_loop_control *ctrl,
|
||||
struct spa_loop_control_hooks *hooks);
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <spa/pod-utils.h>
|
||||
|
||||
struct spa_pod_frame {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <spa/pod.h>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue