mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-10 13:30:05 -05:00
cleanups
Follow the data/size argument order convention to make the api more consistent.
This commit is contained in:
parent
7f931464e8
commit
5bebfe022b
50 changed files with 253 additions and 252 deletions
|
|
@ -213,7 +213,7 @@ gst_pipewire_sink_class_init (GstPipeWireSinkClass * klass)
|
|||
process_mem_data_quark = g_quark_from_static_string ("GstPipeWireSinkProcessMemQuark");
|
||||
}
|
||||
|
||||
#define SPA_PROP_RANGE(min,max) 2,min,max
|
||||
#define PROP_RANGE(min,max) 2,min,max
|
||||
|
||||
static void
|
||||
pool_activated (GstPipeWirePool *pool, GstPipeWireSink *sink)
|
||||
|
|
@ -235,15 +235,15 @@ pool_activated (GstPipeWirePool *pool, GstPipeWireSink *sink)
|
|||
spa_pod_builder_push_object (&b, t->param.idBuffers, t->param_buffers.Buffers);
|
||||
if (size == 0)
|
||||
spa_pod_builder_add (&b,
|
||||
":", t->param_buffers.size, "iru", 0, SPA_PROP_RANGE(0, INT32_MAX), NULL);
|
||||
":", t->param_buffers.size, "iru", 0, PROP_RANGE(0, INT32_MAX), NULL);
|
||||
else
|
||||
spa_pod_builder_add (&b,
|
||||
":", t->param_buffers.size, "ir", size, SPA_PROP_RANGE(size, INT32_MAX), NULL);
|
||||
":", t->param_buffers.size, "ir", size, PROP_RANGE(size, INT32_MAX), NULL);
|
||||
|
||||
spa_pod_builder_add (&b,
|
||||
":", t->param_buffers.stride, "ir", 0, SPA_PROP_RANGE(0, INT32_MAX),
|
||||
":", t->param_buffers.stride, "ir", 0, PROP_RANGE(0, INT32_MAX),
|
||||
":", t->param_buffers.buffers, "iru", min_buffers,
|
||||
SPA_PROP_RANGE(min_buffers,
|
||||
PROP_RANGE(min_buffers,
|
||||
max_buffers ? max_buffers : INT32_MAX),
|
||||
":", t->param_buffers.align, "i", 16,
|
||||
NULL);
|
||||
|
|
@ -256,7 +256,7 @@ pool_activated (GstPipeWirePool *pool, GstPipeWireSink *sink)
|
|||
|
||||
|
||||
pw_thread_loop_lock (sink->main_loop);
|
||||
pw_stream_finish_format (sink->stream, 0, 2, port_params);
|
||||
pw_stream_finish_format (sink->stream, 0, port_params, 2);
|
||||
pw_thread_loop_unlock (sink->main_loop);
|
||||
}
|
||||
|
||||
|
|
@ -610,8 +610,8 @@ gst_pipewire_sink_setcaps (GstBaseSink * bsink, GstCaps * caps)
|
|||
PW_DIRECTION_OUTPUT,
|
||||
pwsink->path,
|
||||
flags,
|
||||
possible->len,
|
||||
(const struct spa_pod **) possible->pdata);
|
||||
(const struct spa_pod **) possible->pdata,
|
||||
possible->len);
|
||||
|
||||
while (TRUE) {
|
||||
state = pw_stream_get_state (pwsink->stream, &error);
|
||||
|
|
|
|||
|
|
@ -664,8 +664,8 @@ gst_pipewire_src_negotiate (GstBaseSrc * basesrc)
|
|||
PW_DIRECTION_INPUT,
|
||||
pwsrc->path,
|
||||
PW_STREAM_FLAG_AUTOCONNECT,
|
||||
possible->len,
|
||||
(const struct spa_pod **)possible->pdata);
|
||||
(const struct spa_pod **)possible->pdata,
|
||||
possible->len);
|
||||
g_ptr_array_free (possible, TRUE);
|
||||
|
||||
while (TRUE) {
|
||||
|
|
@ -738,7 +738,7 @@ on_format_changed (void *data,
|
|||
|
||||
if (format == NULL) {
|
||||
GST_DEBUG_OBJECT (pwsrc, "clear format");
|
||||
pw_stream_finish_format (pwsrc->stream, 0, 0, NULL);
|
||||
pw_stream_finish_format (pwsrc->stream, 0, NULL, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -766,10 +766,10 @@ on_format_changed (void *data,
|
|||
":", t->param_meta.size, "i", sizeof (struct spa_meta_header));
|
||||
|
||||
GST_DEBUG_OBJECT (pwsrc, "doing finish format");
|
||||
pw_stream_finish_format (pwsrc->stream, 0, 2, params);
|
||||
pw_stream_finish_format (pwsrc->stream, 0, params, 2);
|
||||
} else {
|
||||
GST_WARNING_OBJECT (pwsrc, "finish format with error");
|
||||
pw_stream_finish_format (pwsrc->stream, -EINVAL, 0, NULL);
|
||||
pw_stream_finish_format (pwsrc->stream, -EINVAL, NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue