internal/pipewire: respond to Core::Ping
All checks were successful
Test / Create distribution (push) Successful in 36s
Test / Sandbox (push) Successful in 2m39s
Test / Sandbox (race detector) (push) Successful in 4m41s
Test / Hpkg (push) Successful in 5m4s
Test / Hakurei (race detector) (push) Successful in 6m17s
Test / Hakurei (push) Successful in 4m11s
Test / Flake checks (push) Successful in 1m39s
All checks were successful
Test / Create distribution (push) Successful in 36s
Test / Sandbox (push) Successful in 2m39s
Test / Sandbox (race detector) (push) Successful in 4m41s
Test / Hpkg (push) Successful in 5m4s
Test / Hakurei (race detector) (push) Successful in 6m17s
Test / Hakurei (push) Successful in 4m11s
Test / Flake checks (push) Successful in 1m39s
There is currently no known message that will get the PipeWire server to emit this event. It should be handled regardless. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -218,6 +218,14 @@ func (ctx *Context) writeMessage(Id Int, v Message) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
// mustWriteMessage calls writeMessage and panics if a non-nil error is returned.
|
||||
// This must only be called from eventProxy.consume.
|
||||
func (ctx *Context) mustWriteMessage(Id Int, v Message) {
|
||||
if err := ctx.writeMessage(Id, v); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// newProxyId returns a newly allocated proxy Id for the specified type.
|
||||
func (ctx *Context) newProxyId(proxy eventProxy, ack bool) Int {
|
||||
newId := ctx.nextId
|
||||
@@ -620,6 +628,10 @@ func (ctx *Context) roundtrip() (err error) {
|
||||
}
|
||||
}
|
||||
|
||||
// currentRemoteSeq returns the current remote sequence number.
|
||||
// This must only be called from eventProxy.consume.
|
||||
func (ctx *Context) currentRemoteSeq() Int { return ctx.remoteSequence - 1 }
|
||||
|
||||
// consume receives messages from the server and processes events.
|
||||
func (ctx *Context) consume(receiveRemaining []byte) (remaining []byte, err error) {
|
||||
defer func() {
|
||||
|
||||
Reference in New Issue
Block a user