- No C++ compiler needed for this repo
- No Makefile, so we can drop that config
- No epoll needed here (at least not explicitly)
- None of the HAVE_FOO are actually in use
This file is used by the Media Session plugin and by the pw-reserve
tool. Add a job here so where our file differs from the PipeWire one, we
get a warning in the CI.
This tool will stay in PipeWire which now has a copy of the reserve.c|h
file as well. Ideally those files are kept in sync.
This reverts commit 621f27a98b.
Regression introduced in 3560f3ba2d
MEDIA_SESSION_CONFIG_PATH expects the actual directory while
PIPEWIRE_CONFIG_PATH and the built-in fallback both expect the files to
reside within the SESSION_PREFIX subdirectory.
Fixes#1725
(cherry picked from commit dfb63d55dddabb6cc211880fca3974d9c2c297ba)
config_dir is the new MEDIA_SESSION_CONFIG_DIR environment variable (if
set), impl.config_dir is that or the fallback, whichever applies.
Fixes 00bd3b5b59Fixes#1725
(cherry picked from commit 56f01a293c7cd12858b83247282eb419effb77e7)
This looked like it was optional but the media-session code doesn't
treat it as such, more work is needed here.
Meanwhile, make it unconditional until that bug is fixed.
This removes the rest of pipewire from the tree, but keeps the git repo.
The package name is now just 'media-session' but the binary remains
pipewire-media-session for backwards compatibility.
No functional changes besides the removal but a few renames for
variables from PIPEWIRE_FOO to MEDIA_SESSION_FOO (and its lowercase
version).
In docs/ folder, the media-session.dox moved to be the new mainpage
index.dox and all other dox files are removed.
pw-uninstalled.sh becomes media-session-uninstalled.
Finally, the hierarchy was flattened, so
- src/media-session/* goes into src/
- src/daemon/systemd goes into systemd/
- src/media-session/media-session.d goes into media-session.d
The media session modules need to load config files through
sm_media_session_load_conf() and that must be the same config dir as our
main configuration file's directory.
Commit 6c156cdbb4 made pw-uninstalled.sh
export the MEDIA_SESSION_CONFIG_DIR environmental variable, its value
being the location of the media-session configuration files in the
build directory.
Export this environtmental variable in the meson devenv as well.
Fixes: 6c156cdbb4 ("media-session: move the media-session config files to here")
For buffers on the 'dequeued' list, the busy counter was already
incremented in impl_node_process_input(). So it must be decremented again
when these buffers are removed.
The current code has several issues if a pipewiresrc is stopped and deleted
while a buffer is still in use downstream.
- pw_stream_queue_buffer() is never called for the corresponding
pw_buffer. As a result, the busy counter is never decremented and
pw_stream_dequeue_buffer() of the corresponding pipewire output will
return NULL whenever it encounters this buffer.
- The pipewiresrc does not own the buffer reference unless the buffer is
queued in the source, so calling gst_buffer_unref() unconditionally
causes refcount issues for the buffer.
- buffer_recycle() can race with on_remove_buffer() and
gst_pipewire_src_close(). As a result, buffer_recycle() may access pwsrc
when it was already deleted.
The buffer has its own reference to the pool. So the pool object lock can
be used to ensure that the pwsrc, core and stream remain valid in.
buffer_recycle(). If the 'dispose' function pointer was already cleared,
then on_remove_buffer() has already finished, so abort early.
With the pool lock held, it is save to access the pipewire loop. Now the
loop lock can be used to synchronize with on_remove_buffer(). 'dispose'
must be checked again in case on_remove_buffer() was triggered by something
other than gst_pipewire_src_close().
In on_remove_buffer() unref the buffer if it is queued. Otherwise call
pw_stream_queue_buffer() to ensure that the busy counter is decremented
correctly.
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.