node: remove port_send_command

We don't want to do this, we use a sequence to change things
at runtime.
This commit is contained in:
Wim Taymans 2019-02-13 12:43:15 +01:00
parent 04f1046113
commit 7a1bd163f7
27 changed files with 3 additions and 365 deletions

View file

@ -486,22 +486,6 @@ struct spa_node {
*/
int (*port_reuse_buffer) (struct spa_node *node, uint32_t port_id, uint32_t buffer_id);
/**
* Send a command to a port
*
* This function must be called from the data thread.
*
* \param node a spa_node
* \param direction a direction
* \param port_id a port id
* \param command a command to send
* \return 0 on success
* -EINVAL when node is NULL
*/
int (*port_send_command) (struct spa_node *node,
enum spa_direction direction,
uint32_t port_id,
const struct spa_command *command);
/**
* Process the node
*
@ -536,7 +520,6 @@ struct spa_node {
#define spa_node_port_alloc_buffers(n,...) (n)->port_alloc_buffers((n),__VA_ARGS__)
#define spa_node_port_set_io(n,...) (n)->port_set_io((n),__VA_ARGS__)
#define spa_node_port_reuse_buffer(n,...) (n)->port_reuse_buffer((n),__VA_ARGS__)
#define spa_node_port_send_command(n,...) (n)->port_send_command((n),__VA_ARGS__)
#define spa_node_process(n) (n)->process((n))
#ifdef __cplusplus

View file

@ -638,14 +638,6 @@ static int impl_node_port_reuse_buffer(struct spa_node *node, uint32_t port_id,
return -ENOTSUP;
}
static int
impl_node_port_send_command(struct spa_node *node,
enum spa_direction direction, uint32_t port_id, const struct spa_command *command)
{
spa_return_val_if_fail(node != NULL, -EINVAL);
return -ENOTSUP;
}
static int impl_node_process(struct spa_node *node)
{
struct state *this;
@ -701,7 +693,6 @@ static const struct spa_node impl_node = {
impl_node_port_alloc_buffers,
impl_node_port_set_io,
impl_node_port_reuse_buffer,
impl_node_port_send_command,
impl_node_process,
};

View file

@ -649,14 +649,6 @@ static int impl_node_port_reuse_buffer(struct spa_node *node, uint32_t port_id,
return 0;
}
static int
impl_node_port_send_command(struct spa_node *node,
enum spa_direction direction, uint32_t port_id, const struct spa_command *command)
{
spa_return_val_if_fail(node != NULL, -EINVAL);
return -ENOTSUP;
}
static int impl_node_process(struct spa_node *node)
{
struct state *this;
@ -709,7 +701,6 @@ static const struct spa_node impl_node = {
impl_node_port_alloc_buffers,
impl_node_port_set_io,
impl_node_port_reuse_buffer,
impl_node_port_send_command,
impl_node_process,
};

View file

@ -832,21 +832,6 @@ static int impl_node_port_reuse_buffer(struct spa_node *node, uint32_t port_id,
return spa_node_port_reuse_buffer(this->fmt[SPA_DIRECTION_OUTPUT], port_id, buffer_id);
}
static int
impl_node_port_send_command(struct spa_node *node,
enum spa_direction direction,
uint32_t port_id,
const struct spa_command *command)
{
struct impl *this;
spa_return_val_if_fail(node != NULL, -EINVAL);
this = SPA_CONTAINER_OF(node, struct impl, node);
return spa_node_port_send_command(this->fmt[direction], direction, port_id, command);
}
static int impl_node_process(struct spa_node *node)
{
struct impl *this;
@ -906,7 +891,6 @@ static const struct spa_node impl_node = {
impl_node_port_alloc_buffers,
impl_node_port_set_io,
impl_node_port_reuse_buffer,
impl_node_port_send_command,
impl_node_process,
};

View file

@ -1061,15 +1061,6 @@ static int impl_node_port_reuse_buffer(struct spa_node *node, uint32_t port_id,
return 0;
}
static int
impl_node_port_send_command(struct spa_node *node,
enum spa_direction direction,
uint32_t port_id,
const struct spa_command *command)
{
return -ENOTSUP;
}
static int process_control(struct impl *this, struct port *port, struct spa_pod_sequence *sequence)
{
struct spa_pod_control *c;
@ -1181,7 +1172,6 @@ static const struct spa_node impl_node = {
impl_node_port_alloc_buffers,
impl_node_port_set_io,
impl_node_port_reuse_buffer,
impl_node_port_send_command,
impl_node_process,
};

View file

@ -808,15 +808,6 @@ static int impl_node_port_reuse_buffer(struct spa_node *node, uint32_t port_id,
return 0;
}
static int
impl_node_port_send_command(struct spa_node *node,
enum spa_direction direction,
uint32_t port_id,
const struct spa_command *command)
{
return -ENOTSUP;
}
static int impl_node_process(struct spa_node *node)
{
struct impl *this;
@ -924,7 +915,6 @@ static const struct spa_node impl_node = {
impl_node_port_alloc_buffers,
impl_node_port_set_io,
impl_node_port_reuse_buffer,
impl_node_port_send_command,
impl_node_process,
};

View file

@ -862,15 +862,6 @@ static int impl_node_port_reuse_buffer(struct spa_node *node, uint32_t port_id,
return 0;
}
static int
impl_node_port_send_command(struct spa_node *node,
enum spa_direction direction,
uint32_t port_id,
const struct spa_command *command)
{
return -ENOTSUP;
}
static inline int get_in_buffer(struct impl *this, struct port *port, struct buffer **buf)
{
struct spa_io_buffers *io;
@ -1023,7 +1014,6 @@ static const struct spa_node impl_node = {
impl_node_port_alloc_buffers,
impl_node_port_set_io,
impl_node_port_reuse_buffer,
impl_node_port_send_command,
impl_node_process,
};

View file

@ -722,15 +722,6 @@ static int impl_node_port_reuse_buffer(struct spa_node *node, uint32_t port_id,
return 0;
}
static int
impl_node_port_send_command(struct spa_node *node,
enum spa_direction direction,
uint32_t port_id,
const struct spa_command *command)
{
return -ENOTSUP;
}
static int process_control(struct impl *this, struct port *port, struct spa_pod_sequence *sequence)
{
struct spa_pod_control *c;
@ -861,7 +852,6 @@ static const struct spa_node impl_node = {
impl_node_port_alloc_buffers,
impl_node_port_set_io,
impl_node_port_reuse_buffer,
impl_node_port_send_command,
impl_node_process,
};

View file

@ -827,15 +827,6 @@ static int impl_node_port_reuse_buffer(struct spa_node *node, uint32_t port_id,
return 0;
}
static int
impl_node_port_send_command(struct spa_node *node,
enum spa_direction direction,
uint32_t port_id,
const struct spa_command *command)
{
return -ENOTSUP;
}
static int impl_node_process(struct spa_node *node)
{
struct impl *this;
@ -956,7 +947,6 @@ static const struct spa_node impl_node = {
impl_node_port_alloc_buffers,
impl_node_port_set_io,
impl_node_port_reuse_buffer,
impl_node_port_send_command,
impl_node_process,
};

View file

@ -711,15 +711,6 @@ static int impl_node_port_reuse_buffer(struct spa_node *node, uint32_t port_id,
return -ENOTSUP;
}
static int
impl_node_port_send_command(struct spa_node *node,
enum spa_direction direction,
uint32_t port_id,
const struct spa_command *command)
{
return -ENOTSUP;
}
static inline void
add_port_data(struct impl *this, void *out, size_t outsize, struct port *port, int layer)
{
@ -927,7 +918,6 @@ static const struct spa_node impl_node = {
impl_node_port_alloc_buffers,
impl_node_port_set_io,
impl_node_port_reuse_buffer,
impl_node_port_send_command,
impl_node_process,
};

View file

@ -913,15 +913,6 @@ static int impl_node_port_reuse_buffer(struct spa_node *node, uint32_t port_id,
return 0;
}
static int
impl_node_port_send_command(struct spa_node *node,
enum spa_direction direction,
uint32_t port_id,
const struct spa_command *command)
{
return -ENOTSUP;
}
static int process_control(struct impl *this, struct spa_pod_sequence *sequence)
{
struct spa_pod_control *c;
@ -990,7 +981,6 @@ static const struct spa_node impl_node = {
impl_node_port_alloc_buffers,
impl_node_port_set_io,
impl_node_port_reuse_buffer,
impl_node_port_send_command,
impl_node_process,
};

View file

@ -1248,13 +1248,6 @@ static int impl_node_port_reuse_buffer(struct spa_node *node, uint32_t port_id,
return -ENOTSUP;
}
static int
impl_node_port_send_command(struct spa_node *node,
enum spa_direction direction, uint32_t port_id, const struct spa_command *command)
{
return -ENOTSUP;
}
static int impl_node_process(struct spa_node *node)
{
struct impl *this;
@ -1312,7 +1305,6 @@ static const struct spa_node impl_node = {
impl_node_port_alloc_buffers,
impl_node_port_set_io,
impl_node_port_reuse_buffer,
impl_node_port_send_command,
impl_node_process,
};

View file

@ -463,16 +463,6 @@ spa_ffmpeg_dec_node_port_reuse_buffer(struct spa_node *node, uint32_t port_id, u
return -ENOTSUP;
}
static int
spa_ffmpeg_dec_node_port_send_command(struct spa_node *node,
enum spa_direction direction,
uint32_t port_id,
const struct spa_command *command)
{
return -ENOTSUP;
}
static const struct spa_node ffmpeg_dec_node = {
SPA_VERSION_NODE,
spa_ffmpeg_dec_node_enum_params,
@ -491,7 +481,6 @@ static const struct spa_node ffmpeg_dec_node = {
spa_ffmpeg_dec_node_port_alloc_buffers,
spa_ffmpeg_dec_node_port_set_io,
spa_ffmpeg_dec_node_port_reuse_buffer,
spa_ffmpeg_dec_node_port_send_command,
spa_ffmpeg_dec_node_process,
};

View file

@ -417,14 +417,6 @@ spa_ffmpeg_enc_node_port_reuse_buffer(struct spa_node *node, uint32_t port_id, u
return -ENOTSUP;
}
static int
spa_ffmpeg_enc_node_port_send_command(struct spa_node *node,
enum spa_direction direction,
uint32_t port_id, const struct spa_command *command)
{
return -ENOTSUP;
}
static int spa_ffmpeg_enc_node_process(struct spa_node *node)
{
struct impl *this;
@ -468,7 +460,6 @@ static const struct spa_node ffmpeg_enc_node = {
spa_ffmpeg_enc_node_port_alloc_buffers,
spa_ffmpeg_enc_node_port_set_io,
spa_ffmpeg_enc_node_port_reuse_buffer,
spa_ffmpeg_enc_node_port_send_command,
spa_ffmpeg_enc_node_process,
};

View file

@ -665,15 +665,6 @@ static int impl_node_port_reuse_buffer(struct spa_node *node, uint32_t port_id,
return -ENOTSUP;
}
static int
impl_node_port_send_command(struct spa_node *node,
enum spa_direction direction,
uint32_t port_id,
const struct spa_command *command)
{
return -ENOTSUP;
}
static int impl_node_process(struct spa_node *node)
{
struct impl *this;
@ -727,7 +718,6 @@ static const struct spa_node impl_node = {
impl_node_port_alloc_buffers,
impl_node_port_set_io,
impl_node_port_reuse_buffer,
impl_node_port_send_command,
impl_node_process,
};

View file

@ -709,15 +709,6 @@ static int impl_node_port_reuse_buffer(struct spa_node *node, uint32_t port_id,
return 0;
}
static int
impl_node_port_send_command(struct spa_node *node,
enum spa_direction direction,
uint32_t port_id,
const struct spa_command *command)
{
return -ENOTSUP;
}
static int impl_node_process(struct spa_node *node)
{
struct impl *this;
@ -762,7 +753,6 @@ static const struct spa_node impl_node = {
impl_node_port_alloc_buffers,
impl_node_port_set_io,
impl_node_port_reuse_buffer,
impl_node_port_send_command,
impl_node_process,
};

View file

@ -810,14 +810,6 @@ static int impl_node_port_reuse_buffer(struct spa_node *node,
return res;
}
static int impl_node_port_send_command(struct spa_node *node,
enum spa_direction direction,
uint32_t port_id,
const struct spa_command *command)
{
return -ENOTSUP;
}
static uint32_t prop_to_control_id(uint32_t prop)
{
switch (prop) {
@ -947,7 +939,6 @@ static const struct spa_node impl_node = {
impl_node_port_alloc_buffers,
impl_node_port_set_io,
impl_node_port_reuse_buffer,
impl_node_port_send_command,
impl_node_process,
};

View file

@ -813,15 +813,6 @@ static int impl_node_port_reuse_buffer(struct spa_node *node, uint32_t port_id,
return 0;
}
static int
impl_node_port_send_command(struct spa_node *node,
enum spa_direction direction,
uint32_t port_id,
const struct spa_command *command)
{
return -ENOTSUP;
}
static int impl_node_process(struct spa_node *node)
{
struct impl *this;
@ -865,7 +856,6 @@ static const struct spa_node impl_node = {
impl_node_port_alloc_buffers,
impl_node_port_set_io,
impl_node_port_reuse_buffer,
impl_node_port_send_command,
impl_node_process,
};

View file

@ -667,15 +667,6 @@ static int impl_node_port_reuse_buffer(struct spa_node *node, uint32_t port_id,
return 0;
}
static int
impl_node_port_send_command(struct spa_node *node,
enum spa_direction direction,
uint32_t port_id,
const struct spa_command *command)
{
return -ENOTSUP;
}
static struct buffer *find_free_buffer(struct impl *this, struct port *port)
{
struct buffer *b;
@ -810,7 +801,6 @@ static const struct spa_node impl_node = {
impl_node_port_alloc_buffers,
impl_node_port_set_io,
impl_node_port_reuse_buffer,
impl_node_port_send_command,
impl_node_process,
};