Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pipewire: Destroy registry object with remote
This practically reintroduces commit fbe2653 which got reverted in ff8a8de, which I only discovered after coming up with this solution on its own. The main difference is that `discover_node_factory_sync()` gets removed as it doesn't really make much sense to keep around, as well small clean up improvements. The commit message of fbe2653 (by msizanoen1 <[email protected]>)> ``` Currently, the PipeWire registry object is destroyed when discover_node_factory_sync finishes its functionality. This causes registry events to not be delivered to the global_removed_cb and global_added_cb callbacks after discover_node_factory_sync, breaking the functionality of the org.freedesktop.portal.Camera.IsCameraPresent property in case of camera device hot(un)plug. This changes the discover_node_factory_sync function to store the registry in the PipeWireRemote structure and destroy it in pipewire_remote_destroy. ``` This holds true to this day and causes issues for the camera portal, most importantly causing a race condition where cameras that were not yet available during initialization would never get recognized. Whatever crashes it caused at some point I can't reproduce - and Gnome-Shell, which has a very similar implementation for its camera monitor doesn't seem to suffer from crashes as well.
- Loading branch information