From 858a5017ed158caaa6b3a5e1d353ef7e20dd75d6 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 28 Oct 2019 13:21:40 +0100 Subject: [PATCH] small cleanups --- src/examples/export-source.c | 5 +++-- src/pipewire/stream.c | 20 -------------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/src/examples/export-source.c b/src/examples/export-source.c index 99a1b86ff..e4c426b09 100644 --- a/src/examples/export-source.c +++ b/src/examples/export-source.c @@ -210,8 +210,9 @@ static int impl_port_enum_params(void *object, int seq, SPA_TYPE_OBJECT_ParamBuffers, id, SPA_PARAM_BUFFERS_buffers, SPA_POD_CHOICE_RANGE_Int(1, 1, 32), 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_stride, SPA_POD_Int(0), + SPA_PARAM_BUFFERS_size, SPA_POD_CHOICE_RANGE_Int( + BUFFER_SAMPLES * sizeof(float), 32, INT32_MAX), + SPA_PARAM_BUFFERS_stride, SPA_POD_Int(sizeof(float)), SPA_PARAM_BUFFERS_align, SPA_POD_Int(16)); break; diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c index 816a7560d..81b3d4878 100644 --- a/src/pipewire/stream.c +++ b/src/pipewire/stream.c @@ -90,23 +90,9 @@ struct control { 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 pw_stream this; - struct props props; - const char *path; struct pw_core *core; @@ -125,8 +111,6 @@ struct stream { struct spa_callbacks callbacks; struct spa_io_buffers *io; struct spa_io_position *position; - uint32_t io_control_size; - uint32_t io_notify_size; struct spa_list param_list; struct spa_param_info params[5]; @@ -146,8 +130,6 @@ struct stream { uintptr_t seq; struct pw_time time; - uint32_t param_propinfo; - unsigned int async_connect:1; unsigned int disconnecting: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->node_id = SPA_ID_INVALID; - reset_props(&impl->props); - spa_ringbuffer_init(&impl->dequeued.ring); spa_ringbuffer_init(&impl->queued.ring); spa_list_init(&impl->param_list);