The proxy errors are really from the session manager informing us about
decisions it made (failure to link, etc). The state of the stream is not
really affected by this so just emit the error signal and let the app
decide what to do.
Keep separate map for fd to files so we can implement dup.
Filter out duplicates in enumfmt.
tryfmt should return the closest match.
Use pthread_once to init the global state.
Make things mostly work in GStreamer.
Add support for more formats.
Connect in the reqbufs ioctl so that we can negotiate the right amount
of buffers.
Keep file and buffer maps so that we can map an address to a file and
then the address to a buffer of that file. We can then also check if the
buffers were unmapped properly.
Implement some more ioctls.
Add some more checks.
Collect all video/source nodes and enumerate their formats. We use this
to return the supported formats and to check if a format is supported.
Use evenfd as the even we return from open. Make the eventfd readable
when we have a new buffer ready.
Connect a stream when setting a format. Collect buffers. Implement
mmap/munmap on the buffer memory. Implement queue and dequeue of buffers.
This is enough to make the webcam test work in firefox.
Use this to override the default $PIPEWIRE_CONFIG_DIR/media-session.d
directory. This allows us to have separate configuration directories for
pipewire and media-session.
Make things work then there is no default input device and the default
source is actually the monitor of the default sink.
Also implement lookups of monitor sources with the monitor id as the
name.
Fixes#1691
pause_node() will check the IDLE state of the node and will not
deactivate the node when suspending when it was already IDLE.
Fixes an issue where node.pause-on-idle=false filters would not want to
resume after a suspend.
If we try to fetch a property as some specific type and the parsing
fails, log a warning. This should catch any client bugs where the
properties are set wrongly.
Two method calls to get properties,
- pw_properties_fetch_$type()
- pw_properties_get_$type()
The former allows for easy error checking and conditional setting of
properties. The latter for easy fetching of a property with a default
value. This simplifies the code and makes property parsing behave more
consistently across the code base.
Before:
str = pw_properties_get(props, "foo");
if (str)
myval = pw_properties_parse_int(props, str);
if (myval == 0) /* parsing error or a valid zero */
do_stuff(myval);
Now:
if (pw_properties_fetch_int32(props, "foo", &myval) == 0)
do_stuff(myval);
If we build media-session before the daemon we have the executable
variable available and can rely on meson to fill in the path instead of
handling it manually.
There are only two values we care about that are identical, we can
re-set those in a new configuration_data() object.
All the other values set by the pipewire daemon are related to how we
start the session manager which isn't applicable here.
When pause-on-idle is false, the node can be destroyed without ever
being deactivated, which would crash. Make sure we deactivate in destroy
and remove the node from the graph.