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
|
|
@ -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);
|
stream_set_state(stream, PW_STREAM_STATE_STREAMING, NULL);
|
||||||
}
|
}
|
||||||
} else if (SPA_COMMAND_TYPE(command) == context->type.command_node.ClockUpdate) {
|
} else if (SPA_COMMAND_TYPE(command) == context->type.command_node.ClockUpdate) {
|
||||||
struct spa_command_node_clock_update *cu =
|
struct spa_command_node_clock_update *cu = (__typeof__(cu)) command;
|
||||||
(struct spa_command_node_clock_update *) command;
|
|
||||||
if (cu->body.flags.value & SPA_COMMAND_NODE_CLOCK_UPDATE_FLAG_LIVE) {
|
if (cu->body.flags.value & SPA_COMMAND_NODE_CLOCK_UPDATE_FLAG_LIVE) {
|
||||||
pw_properties_set(stream->properties, "pipewire.latency.is-live", "1");
|
pw_properties_set(stream->properties, "pipewire.latency.is-live", "1");
|
||||||
pw_properties_setf(stream->properties,
|
pw_properties_setf(stream->properties,
|
||||||
|
|
|
||||||
|
|
@ -225,7 +225,8 @@ static int
|
||||||
spa_proxy_node_get_n_ports(struct spa_node *node,
|
spa_proxy_node_get_n_ports(struct spa_node *node,
|
||||||
uint32_t *n_input_ports,
|
uint32_t *n_input_ports,
|
||||||
uint32_t *max_input_ports,
|
uint32_t *max_input_ports,
|
||||||
uint32_t * n_output_ports, uint32_t * max_output_ports)
|
uint32_t *n_output_ports,
|
||||||
|
uint32_t *max_output_ports)
|
||||||
{
|
{
|
||||||
struct proxy *this;
|
struct proxy *this;
|
||||||
|
|
||||||
|
|
@ -249,7 +250,9 @@ spa_proxy_node_get_n_ports(struct spa_node *node,
|
||||||
static int
|
static int
|
||||||
spa_proxy_node_get_port_ids(struct spa_node *node,
|
spa_proxy_node_get_port_ids(struct spa_node *node,
|
||||||
uint32_t n_input_ports,
|
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;
|
struct proxy *this;
|
||||||
int c, i;
|
int c, i;
|
||||||
|
|
@ -690,7 +693,8 @@ spa_proxy_node_port_alloc_buffers(struct spa_node *node,
|
||||||
uint32_t port_id,
|
uint32_t port_id,
|
||||||
struct spa_param **params,
|
struct spa_param **params,
|
||||||
uint32_t n_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 *this;
|
||||||
struct proxy_port *port;
|
struct proxy_port *port;
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,8 @@ static struct spa_buffer **alloc_buffers(struct pw_link *this,
|
||||||
struct spa_param **params,
|
struct spa_param **params,
|
||||||
uint32_t n_datas,
|
uint32_t n_datas,
|
||||||
size_t *data_sizes,
|
size_t *data_sizes,
|
||||||
ssize_t * data_strides, struct pw_memblock *mem)
|
ssize_t *data_strides,
|
||||||
|
struct pw_memblock *mem)
|
||||||
{
|
{
|
||||||
struct spa_buffer **buffers, *bp;
|
struct spa_buffer **buffers, *bp;
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
|
|
|
||||||
|
|
@ -470,7 +470,9 @@ impl_node_port_alloc_buffers(struct spa_node *node,
|
||||||
enum spa_direction direction,
|
enum spa_direction direction,
|
||||||
uint32_t port_id,
|
uint32_t port_id,
|
||||||
struct spa_param **params,
|
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;
|
struct state *this;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,9 @@ impl_node_set_callbacks(struct spa_node *node,
|
||||||
static int
|
static int
|
||||||
impl_node_get_n_ports(struct spa_node *node,
|
impl_node_get_n_ports(struct spa_node *node,
|
||||||
uint32_t *n_input_ports,
|
uint32_t *n_input_ports,
|
||||||
uint32_t * max_input_ports, uint32_t * n_output_ports, uint32_t * max_output_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);
|
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
|
static int
|
||||||
impl_node_get_port_ids(struct spa_node *node,
|
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);
|
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,
|
enum spa_direction direction,
|
||||||
uint32_t port_id,
|
uint32_t port_id,
|
||||||
struct spa_param **params,
|
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;
|
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;
|
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;
|
struct state *this;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -311,7 +311,10 @@ static int set_swparams(struct state *state)
|
||||||
|
|
||||||
static inline snd_pcm_uframes_t
|
static inline snd_pcm_uframes_t
|
||||||
pull_frames(struct state *state,
|
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;
|
snd_pcm_uframes_t total_frames = 0, to_write = frames;
|
||||||
struct spa_port_io *io = state->io;
|
struct spa_port_io *io = state->io;
|
||||||
|
|
@ -384,7 +387,9 @@ pull_frames(struct state *state,
|
||||||
|
|
||||||
static snd_pcm_uframes_t
|
static snd_pcm_uframes_t
|
||||||
push_frames(struct state *state,
|
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;
|
snd_pcm_uframes_t total_frames = 0;
|
||||||
struct spa_port_io *io = state->io;
|
struct spa_port_io *io = state->io;
|
||||||
|
|
@ -443,7 +448,9 @@ static int alsa_try_resume(struct state *state)
|
||||||
return res;
|
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_sec = now->tv_sec;
|
||||||
ts->tv_nsec = now->tv_nsec;
|
ts->tv_nsec = now->tv_nsec;
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,8 @@ static int
|
||||||
spa_ffmpeg_enc_node_get_n_ports(struct spa_node *node,
|
spa_ffmpeg_enc_node_get_n_ports(struct spa_node *node,
|
||||||
uint32_t *n_input_ports,
|
uint32_t *n_input_ports,
|
||||||
uint32_t *max_input_ports,
|
uint32_t *max_input_ports,
|
||||||
uint32_t * n_output_ports, uint32_t * max_output_ports)
|
uint32_t *n_output_ports,
|
||||||
|
uint32_t *max_output_ports)
|
||||||
{
|
{
|
||||||
if (node == NULL)
|
if (node == NULL)
|
||||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||||
|
|
@ -156,7 +157,8 @@ static int
|
||||||
spa_ffmpeg_enc_node_get_port_ids(struct spa_node *node,
|
spa_ffmpeg_enc_node_get_port_ids(struct spa_node *node,
|
||||||
uint32_t n_input_ports,
|
uint32_t n_input_ports,
|
||||||
uint32_t *input_ids,
|
uint32_t *input_ids,
|
||||||
uint32_t n_output_ports, uint32_t * output_ids)
|
uint32_t n_output_ports,
|
||||||
|
uint32_t *output_ids)
|
||||||
{
|
{
|
||||||
if (node == NULL)
|
if (node == NULL)
|
||||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||||
|
|
@ -344,7 +346,8 @@ spa_ffmpeg_enc_node_port_alloc_buffers(struct spa_node *node,
|
||||||
uint32_t port_id,
|
uint32_t port_id,
|
||||||
struct spa_param **params,
|
struct spa_param **params,
|
||||||
uint32_t n_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;
|
return SPA_RESULT_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue