Make it possible to wrap nodes created by a device in a wrapper such
as adapter.
Update the minimal.conf to use udev to detect and configure devices and
nodes. Add a config switch to switch back to hardcoded config.
Instead of copying all the device properties to the child object,
only copy the ones in device.object.properties and add the
ones from the object info.
Clean up the object handles when something goes wrong.
impl-metadata would not monitor for globals being removed.
This would cause stale metadata to remain in the
store, causing future objects on the same ids to have invalid data.
Previously both `impl_on_notify_events()` and `process_{device,card}()`
called `check_access()`. Avoid that by merging `ACTION_ADD` and
`ACTION_DISABLE` into a single `ACTION_CHANGE` and let `process_{device,card}()`
call `check_access()` and decide what to do.
Split up `process_{device,card}()` to have a separate function that does
the lookup based on the udev device, and only use that when there is
no available reference to the actual device/card object.
`IN_IGNORED` event is sent whenever the watch is removed,
which includes when the entity is deleted among other things,
so watch that instead of the more specific `IN_DELETE_SELF`.
If a pipewire property has quotes, the DOT graph fails to be generated because
they are not escaped. This patch fixes this by escaping the quotes from a
pipewire property value before adding it to the graph
This changes avoids constantly reallocating the DOT data string every time
someting is added. We now always allocate a DOT data string of size 2048, and
we only reallocate by size * 2 if we need more data.
When we remove a global, we set NULL,NULL,NULL as its metadata. This
then results in the implementor of the metadata to emit the property
change event for the subject.
When we decide to propagate this event to the listeners we not only
need to check if the client can see the global but also if the global
was removed and this is a remove metadata event.
Fixes metadata remove events when a global is removed.
Add a MAPPABLE data flag that hints that the fd in the data is mappable
with a simple mmap/munmap. Normally, DmaBuf is not mappable like that
unless explicitly indicated with this flag.
Set the MAPPABLE flag on the DmaBuf from v4l2 and libcamera fd.
When asked, mmap the buffer memory in all cases when the MAPPABLE
flag is set.
This solves the case where v4l2 has exported DmaBuf and is streaming to
node A and then node B links but doesn't get automatically mmaped
memory.
Fixes#3840
Add props to the protocol_data and server. Instead of storing the
server_info, just add the relevant properties for the server to the
props.
When we get a new client, we can simply copy the server props to the
client props. This makes it possible to create specific servers later
that create clients with specific properties.
Use a subset of the context properties to create servers. We only need
the CORE_NAME for now.
When the server closes the connection in non-interactive mode, we need
to set the quit flag to avoid going into second mainloop_run() that will
just block forever.
See #3837
When the invoke ringbuffer is full, sleep a little and try again.
Add an option to set the retty timeout, setting this to 0 restores
the old behaviour of returning -EPIPE.
Most callers don't check the return values and might assume the invoke
call is queued or executed, which could cause crashes or leaks.
When the queue overruns, it's better to log a warning and hope that the
problem is resolved soon. We might abort or return the error to the
caller later if we want to break the retry loop.
See !1887