When uclibc is build with !UCLIBC_HAS_LOCALE the macro
__LOCALE_C_ONLY will be set, use this to disable unsupported and
not required(due to only supporting the C locale) locale functions.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
We need exactly 4 hex characters, everything else is refused. We
also copy those characters directly to the output string without
assuming any encoding.
See #2337
Make helper method to parse thread properties and add 2 new properties
to control name and stack-size of the thread.
Use properties when creating threads with the default utils.
Use the default thread utils instead of pthread_create so that the
properties are used.
Not all string functions have a POSIX compliant locale aware version
(eg. strtof_l). Instead uselocale [1] should be used, which allows
switching the locale of a thread to a welldefined one and restoring it
afterwards.
[1] https://man7.org/linux/man-pages/man3/uselocale.3.html
And use this in spa_json_format_float() where we also avoid invalid
json floats.
Use json float format in some places where we serialize json floats.
Add a unit test.
See #2223
Resizes the buffer dynamically. Be careful with getting the address
of a pod in the buffer, it might not be valid after building more stuff
with the builder.
Place the methods on the interface so that we can call them.
Rename create to init because that is what it does.
Add support for listener and events so that we can signal property
changes later.
Move all backends to dynamic libaries loaded with spa_plugin_loader so
new backends not needs changes in pipewire or pipewire dependency to
external code
Change-Id: I702ce047598d0c318d6dc6ac8248062a5c12f643
Add an extra private field to the source to store the pollevent of
the current iteration. This changes ABI but it seems an embedded source
is not used outside of our own plugins and the unit test doesn't test
this ABI case.
Whenever a source is removed, we can set the data field of the
pollevent to NULL so that it won't be handled in any iteration anymore.
Avoid dispatching the same event multiple times when doing recursive
iterations.
Add some more unit tests for this.
Fixes#2114
If the supplied buffer has smaller (or equal) size than the
length of the string, then `strncpy()` will not place a null
terminator in the buffer.
Fix that by always setting the last byte of the buffer to zero.
Older gcc versions seem to require the members to appear in the
designated initializer in the order they are in the definition of
the struct when compiling C++.
Fixes#1910
Given that 10-bit colour is now becoming supported on Wayland, PipeWire
should be able to represent all the possible colour formats in order
for screen capture to work.
This commit adds all possible orderings of 10-bit RGB channels and 2
extra bits used for nothing or alpha in little endian to enum
spa_video_format. Note that Wayland only uses little endian for its
10-bit colour formats, and these are not the same as the big endian
formats in reverse order.
0 is a valid min latency so we can't use it as an unset value. Use
some large value instead and when nothing was configured, assume it
is 0.
Fixes#1839
Instead of doing pointer arithmetic through actual pointers, cast them
to the proper integer types.
This is functionally equivalent to the previous code but is clearer for
the compiler.
Fixes#1018
The event is emitted by a node that is not a driver but wants the graph
to be scheduled. The command is sent to the driver and suggest that the
graph be scheduled.
Add a method to enable/disable the denormals flush-to-zero and
denormals-as-zero CPU options.
Add a config option to make it possible to disable this again.
Fixes high CPU usage when dealing with denormals, which can happen
in many DSP functions.
Fixes#1681
The logt function should fall back when both the logger implementation
version is too low or when the method is not implemented.
We can use the new spa_callback_call return value to efficiently
handle this.