This commit is contained in:
Wim Taymans 2017-05-26 18:19:51 +02:00
parent f7de744ec9
commit ded1ea69a1
54 changed files with 301 additions and 274 deletions

View file

@ -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));

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;
}

View file

@ -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;

View file

@ -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; \

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;

View file

@ -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];