Check if we are driving or following and only start the timers when we
are the driver of the graph.
Ready events from non-drivers are not really a problem because they are
ignored. They only cause unnecessary wakeups in the graph.
Add a simple quirks table.
Forces S16 formats for teams sink and source info.
Forces removal of the DONT_MOVE flag for capture streams for firefox.
See #838 and #1363
Mark some structures, arrays static/const at various places.
In some cases this prevents unnecessary initialization
when a function is entered.
All in all, the text segments across all shared
libraries are reduced by about 2 KiB. However,
the total size increases by about 2 KiB as well.
Instead of spa_aprintf(), convert `rfcomm_send_{cmd,query}`
to take a printf-style format string.
Furthermore, handle overflows and return errors from
`rfcomm_send_{cmd,reply}`. And make those functions
take an rfcomm as argument instead of any spa_source.
And match conversion specifiers to the actual types
in format strings.
If the number of bytes read is not a multiple of the stride,
then partial samples may be queued. Avoid that by storing the
last partial sample (if any) in a separate buffer,
and only queue full samples.
Previously, the code did not set any error code, leaving res = 0,
when the file existed but it wasn't a pipe. This resulted in no
status code being returned to the client.
`sysname` need not be static since `avahi_string_list_add_pair()`
creates a copy, and no other parts of the code have reference to
`sysname` that would require static lifetime.
Furthermore, do not hardcode the size of the array.
Add a new object.register boolean property.
Make adapter and remote-note only register when object.register
is true.
Make stream and filter not register themselves. They are always
exported to a remote server and thus don't need local
registration.
Fixes#1309
Passing a '-' as the port or node for create-link will omit sending
the property to create-link so we can check if the link factory handles
missing properties too.
See #1365
Strip the alibpref from the device string in the mapping name. This
name is used to generate the node name eventually and we don't want
this random identifier in it.
Fixes#1362
The node.link-group property marks streams that are internally linked
together in some way. It is used to relate the input and output streams
of some of the module streams.
To iterate over an array of `T`, the iterator must be `(const) T *`,
so that the types are compatible when `T[]` decays into `T *`.
In the example when `struct foo *[]` decays, it becomes `struct foo **`,
which is not compatible with the the type of iterator, `struct foo *`.
Fix that by changing the type of the array to `struct foo[]`.
If the caller asks for MemFd, pass a DmaBuf because it is mostly
the same for v4l2.
Not very correct but it's not yet trivial to fall back to memfd.
And this way we have something to give to the clients that will work
when the client asks for MemFd or MemPtr.
It is more like how JACK2 does things.
We get FIFO scheduling by default and we don't get killed by RTKit
when doing long operations, which seem to be the case for many
plugins.
The thread name can only be 16 chars. We don't need to strdup the
name but copy and trunc into a fixed buffer.
We can also set the thread name right after we created the thread.
Emit a warning when we can't set the thread name
Make jack_client_create_thread() create FIFO threads, like the
JACK implementation did. We should probably hook that into the
module-rt functions somehow.
Fixes#1349
libcamera commit ec7afef665a87eb389a5a4cb9ff35e9c24bbcc29 (2021-06-24)
changed the name of the generated pkg-config file from 'camera.pc'
to 'libcamera.pc'.
First look for the libcamera dependency under the new name 'libcamera',
and if that's not found, look for it under the older name 'camera'.
Fixes#1355
Several places in the code don't handle reconnecting DBus connections
yet. In those cases, a ref to the DBusConnection handle needs to be
kept, so that there's no use-after-free if it gets freed by spa_dbus
if the connection is broken.
Adjust spa_dbus so that others keeping additional refs is safe.
Until now the 'v4l2' feature was not actually checking that its
required header has been found, this commit adds a check for
<linux/videodev2.h> and correctly reports both header status and whether
the feature itself ends up enabled (depends on libudev).
When a sink is RUNNING but there is nothing linked to the input it must
be the monitor that is keeping it active, report IDLE for the sink in
that case.
When a source is RUNNING but there is nothing linked to the output it
must be the sink part that is keeping it active, report IDLE for the
source.
Fixes#1345