mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
Type changes
Only allow properties inside objects, this makes it easier to iterate the object, which is needed for efficiently processing control streams. Add a choice type to mark variable properties. SPA_TYPE_Enum -> SPA_TYPE_Id to avoid confusion with choice enum Make it easier to allocate and initialize properties on the stack Make more efficient methods to make objects.
This commit is contained in:
parent
03fdabd155
commit
cc842cbdc8
63 changed files with 2253 additions and 1880 deletions
|
|
@ -232,25 +232,25 @@ pool_activated (GstPipeWirePool *pool, GstPipeWireSink *sink)
|
|||
spa_pod_builder_init (&b, buffer, sizeof (buffer));
|
||||
spa_pod_builder_push_object (&b, SPA_TYPE_OBJECT_ParamBuffers, SPA_PARAM_Buffers);
|
||||
if (size == 0)
|
||||
spa_pod_builder_add (&b,
|
||||
":", SPA_PARAM_BUFFERS_size, "iru", 0, SPA_POD_PROP_MIN_MAX(0, INT32_MAX), NULL);
|
||||
spa_pod_builder_props (&b,
|
||||
SPA_PARAM_BUFFERS_size, &SPA_POD_CHOICE_RANGE_Int(0, 0, INT32_MAX), 0);
|
||||
else
|
||||
spa_pod_builder_add (&b,
|
||||
":", SPA_PARAM_BUFFERS_size, "iru", size, SPA_POD_PROP_MIN_MAX(size, INT32_MAX), NULL);
|
||||
spa_pod_builder_props (&b,
|
||||
SPA_PARAM_BUFFERS_size, &SPA_POD_CHOICE_RANGE_Int(size, size, INT32_MAX), 0);
|
||||
|
||||
spa_pod_builder_add (&b,
|
||||
":", SPA_PARAM_BUFFERS_stride, "iru", 0, SPA_POD_PROP_MIN_MAX(0, INT32_MAX),
|
||||
":", SPA_PARAM_BUFFERS_buffers, "iru", min_buffers,
|
||||
SPA_POD_PROP_MIN_MAX(min_buffers,
|
||||
spa_pod_builder_props (&b,
|
||||
SPA_PARAM_BUFFERS_stride, &SPA_POD_CHOICE_RANGE_Int(0, 0, INT32_MAX),
|
||||
SPA_PARAM_BUFFERS_buffers, &SPA_POD_CHOICE_RANGE_Int(min_buffers, min_buffers,
|
||||
max_buffers ? max_buffers : INT32_MAX),
|
||||
":", SPA_PARAM_BUFFERS_align, "i", 16,
|
||||
NULL);
|
||||
SPA_PARAM_BUFFERS_align, &SPA_POD_Int(16),
|
||||
0);
|
||||
port_params[0] = spa_pod_builder_pop (&b);
|
||||
|
||||
port_params[1] = spa_pod_builder_object (&b,
|
||||
SPA_TYPE_OBJECT_ParamMeta, SPA_PARAM_Meta,
|
||||
":", SPA_PARAM_META_type, "I", SPA_META_Header,
|
||||
":", SPA_PARAM_META_size, "i", sizeof (struct spa_meta_header));
|
||||
SPA_PARAM_META_type, &SPA_POD_Int(SPA_META_Header),
|
||||
SPA_PARAM_META_size, &SPA_POD_Int(sizeof (struct spa_meta_header)),
|
||||
0);
|
||||
|
||||
|
||||
pw_thread_loop_lock (sink->main_loop);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue