aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pipewire/core_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-12-10 00:59:01 +0900
committerOphestra <cat@gensokyo.uk>2025-12-10 01:00:03 +0900
commitd8417e292762eebbbe7203aa98eb34eb5c34434e (patch)
tree006d34dd9197106a6fea9597eb3bd3578bf3f29f /internal/pipewire/core_test.go
parentccc0d98bd72e84b066fcbf9677a75293e2b850e1 (diff)
internal/pipewire: implement Registry::GlobalRemove
This is emitted by PipeWire when a global object disappears, because PipeWire insists that all clients that had called Core::GetRegistry must constantly sync its local registry state with the remote. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pipewire/core_test.go')
-rw-r--r--internal/pipewire/core_test.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/internal/pipewire/core_test.go b/internal/pipewire/core_test.go
index a6b6729a..42b18b98 100644
--- a/internal/pipewire/core_test.go
+++ b/internal/pipewire/core_test.go
@@ -745,6 +745,23 @@ func TestRegistryGlobal(t *testing.T) {
}.run(t)
}
+func TestRegistryGlobalRemove(t *testing.T) {
+ t.Parallel()
+
+ encodingTestCases[pipewire.RegistryGlobalRemove, *pipewire.RegistryGlobalRemove]{
+ {"sample", []byte{
+ /* size: rest of data*/ 0x10, 0, 0, 0,
+ /* type: Struct */ 0xe, 0, 0, 0,
+ /* size: 4 bytes */ 4, 0, 0, 0,
+ /* type: Int */ 4, 0, 0, 0,
+ /* value: 0xbad */ 0xad, 0xb, 0, 0,
+ /* padding */ 0, 0, 0, 0,
+ }, pipewire.RegistryGlobalRemove{
+ ID: 0xbad,
+ }, nil},
+ }.run(t)
+}
+
func TestRegistryBind(t *testing.T) {
t.Parallel()