internal/pipewire: implement Core::Hello

This implements enough types to correctly marshal and unmarshal Core::Hello.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-11-24 23:29:06 +09:00
parent 9f7b0c2f46
commit 5bcafcf734
5 changed files with 329 additions and 72 deletions

View File

@@ -0,0 +1,22 @@
package pipewire_test
import (
"testing"
"hakurei.app/internal/pipewire"
)
func TestCoreHello(t *testing.T) {
encodingTestCases[pipewire.CoreHello, *pipewire.CoreHello]{
{"sample", []byte{
0x10, 0, 0, 0,
0xe, 0, 0, 0,
4, 0, 0, 0,
4, 0, 0, 0,
4, 0, 0, 0,
0, 0, 0, 0,
}, pipewire.CoreHello{
Version: pipewire.PW_VERSION_CORE,
}, nil},
}.run(t)
}