This reverts commit db44fe47ee.
We should not be merging config files at this point. Generating config
files should be done offline and only the result is loaded here.
Use this for the version.h file so we enforce that being used everywhere
instead of accidentaly relying on whatever ends up in config.h.
The generated version.h file is identical.
Properly escape the keys because we're trying to generate
valid JSON.
Always place ',' after items.
Add a flag to add a '\n' before each item.
Don't try to string-encode the value when it's already a string.
Load and parse config files in the following order:
$PIPEWIRE_CONFIG_DIR or /usr/share/pipewire
/etc/pipewire
$XDG_CONFIG_DIR or ~/.config/pipewire
This ensure we always load a working base config and reduce the
chances of failing because of a back user config file.
The user config file now only needs to contain the section that
needs the be changed.
See #207
Override the CORE_NAME using the env variable in the context instead
of pipewire.c. This avoids needing the _add_string() property method.
Remove the properties_add_string() method, there are new improved
plans for property parsing and merging: See #207
Try to keep the full docs out of the headers and into the .c file.
A small short blurb in the header is enough for quick lookups.
Also try to use a regular comment to not confuse the doc system.
If pw_array_ensure_size() is called on an array that has not been initialized
with an extend, assert. Otherwise we get stuck in an infinite loop since
doubling our zero allocation size will never reach "need".
Previously, if the string started with any of the characters in
delimiter, the first returned string would've been an empty string.
This is in contrast with the fact that otherwise `pw_split_walk()`
skips empty fields.
E.g.
"::field1::field2" with ":" as `delimiter`
would have resulted in
* ""
* "field1"
* "field2".
Adjust the function to skip leading runs of characters in `delimiter`
by calling `strspn()` first.
Since `pw_split_walk()` does not skip leading runs of
delimiters, if `module_dir` is an absolute path, then
l = pw_split_strv(module_dir, "/", 0, &n_paths);
will return an array of one element, which is exactly the same
as `module_dir`, `strcmp(l[0], module_dir) == 0`.
If `module_dir` is a relative path, then the returned array
still contains a single element, which is, again, the same
as `module_dir`.
Therefore, omit the the call to `pw_split_strv()` and simply
use `module_dir` as is.
Mostly uses the existing infrastructure, but the webrtc canceller has a
fixed blocksize, so we:
1. Use the canceller blocksize if configured
2. Accumulate output data in a ringbuffer
3. Push out the data in the required chunk size