mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
small cleanups
This commit is contained in:
parent
4f5a5fc917
commit
858a5017ed
2 changed files with 3 additions and 22 deletions
|
|
@ -210,8 +210,9 @@ static int impl_port_enum_params(void *object, int seq,
|
||||||
SPA_TYPE_OBJECT_ParamBuffers, id,
|
SPA_TYPE_OBJECT_ParamBuffers, id,
|
||||||
SPA_PARAM_BUFFERS_buffers, SPA_POD_CHOICE_RANGE_Int(1, 1, 32),
|
SPA_PARAM_BUFFERS_buffers, SPA_POD_CHOICE_RANGE_Int(1, 1, 32),
|
||||||
SPA_PARAM_BUFFERS_blocks, SPA_POD_Int(1),
|
SPA_PARAM_BUFFERS_blocks, SPA_POD_Int(1),
|
||||||
SPA_PARAM_BUFFERS_size, SPA_POD_CHOICE_RANGE_Int(BUFFER_SAMPLES * sizeof(float), 32, 4096),
|
SPA_PARAM_BUFFERS_size, SPA_POD_CHOICE_RANGE_Int(
|
||||||
SPA_PARAM_BUFFERS_stride, SPA_POD_Int(0),
|
BUFFER_SAMPLES * sizeof(float), 32, INT32_MAX),
|
||||||
|
SPA_PARAM_BUFFERS_stride, SPA_POD_Int(sizeof(float)),
|
||||||
SPA_PARAM_BUFFERS_align, SPA_POD_Int(16));
|
SPA_PARAM_BUFFERS_align, SPA_POD_Int(16));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -90,23 +90,9 @@ struct control {
|
||||||
float values[64];
|
float values[64];
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DEFAULT_VOLUME 1.0
|
|
||||||
|
|
||||||
struct props {
|
|
||||||
float volume;
|
|
||||||
unsigned int changed:1;
|
|
||||||
};
|
|
||||||
|
|
||||||
static void reset_props(struct props *props)
|
|
||||||
{
|
|
||||||
props->volume = DEFAULT_VOLUME;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct stream {
|
struct stream {
|
||||||
struct pw_stream this;
|
struct pw_stream this;
|
||||||
|
|
||||||
struct props props;
|
|
||||||
|
|
||||||
const char *path;
|
const char *path;
|
||||||
|
|
||||||
struct pw_core *core;
|
struct pw_core *core;
|
||||||
|
|
@ -125,8 +111,6 @@ struct stream {
|
||||||
struct spa_callbacks callbacks;
|
struct spa_callbacks callbacks;
|
||||||
struct spa_io_buffers *io;
|
struct spa_io_buffers *io;
|
||||||
struct spa_io_position *position;
|
struct spa_io_position *position;
|
||||||
uint32_t io_control_size;
|
|
||||||
uint32_t io_notify_size;
|
|
||||||
|
|
||||||
struct spa_list param_list;
|
struct spa_list param_list;
|
||||||
struct spa_param_info params[5];
|
struct spa_param_info params[5];
|
||||||
|
|
@ -146,8 +130,6 @@ struct stream {
|
||||||
uintptr_t seq;
|
uintptr_t seq;
|
||||||
struct pw_time time;
|
struct pw_time time;
|
||||||
|
|
||||||
uint32_t param_propinfo;
|
|
||||||
|
|
||||||
unsigned int async_connect:1;
|
unsigned int async_connect:1;
|
||||||
unsigned int disconnecting:1;
|
unsigned int disconnecting:1;
|
||||||
unsigned int free_data:1;
|
unsigned int free_data:1;
|
||||||
|
|
@ -1192,8 +1174,6 @@ struct pw_stream * pw_stream_new(struct pw_remote *remote, const char *name,
|
||||||
this->name = name ? strdup(name) : NULL;
|
this->name = name ? strdup(name) : NULL;
|
||||||
this->node_id = SPA_ID_INVALID;
|
this->node_id = SPA_ID_INVALID;
|
||||||
|
|
||||||
reset_props(&impl->props);
|
|
||||||
|
|
||||||
spa_ringbuffer_init(&impl->dequeued.ring);
|
spa_ringbuffer_init(&impl->dequeued.ring);
|
||||||
spa_ringbuffer_init(&impl->queued.ring);
|
spa_ringbuffer_init(&impl->queued.ring);
|
||||||
spa_list_init(&impl->param_list);
|
spa_list_init(&impl->param_list);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue