| Age | Commit message (Collapse) | Author |
|
This is unnecessary and does not match upstream behaviour.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
These are PipeWire spa_dict keys. Interestingly many keys in the sample are undefined and appear as magic strings in upstream source code.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
These are mostly small formatting changes, with the biggest change being to UnexpectedEOFError where its kind is now described as part of the error type.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This provides more useful messages for protocol errors.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This should make things easier to navigate, and possible to fully automatically generate the constants in the future.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This makes their handling much less error-prone.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
These errors are recoverable and should not terminate event handling. Only terminate event handling for protocol errors or inconsistent state that makes further event handling impossible.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
These proxies (with special cases documented in the implementation) are only safe for use after acknowledgement from the server.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This event is not encountered in the pw-container sample, but already has existing sample from an excerpt.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This consumes the entire sample, is validated to send identical messages and correctly handle received messages.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This was written when the protocol was still barely understood, so none of the types here are correct and match the rest of the protocol. This change corrects these types.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
The io.ErrUnexpectedEOF error can be returned from multiple places. This change eases error handling.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is useful during serialisation.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Performance does not matter for the use case of this library, but it is still interesting to know.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Sample was captured from pw-cli.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
I could not get the server to produce these events, however I am confident enough with the implementation to do it by hand.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is finally the thing we are after.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This change also adds test cases for messages before this one.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This corresponds with the core generation footer and seem to be the only other possible footer type.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Dealing with this event reawakened my burning hatred for OOP.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
These match the names found in documentation.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is effectively a poor man's slice, it is entirely unnecessary here and can be handled internally.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This removes the need for manual splitting. The understanding of the format is robust enough to allow this to happen anyway.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
These did not appear useful at first since it was assumed to be filenames for loading modules.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
These were getting very annoying to type.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This fixes serialisation of NULL spa_dict.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This eliminates all non-reflect allocations.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is still not efficient by any means, but it should eliminate most non-reflect allocation (all allocation if PODMarshaler is not used).
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is required to achieve zero allocation (other than reflect).
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This change uses the (somewhat) newly exposed MarshalAppend which improves readability.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This gets rid of magic numbers in marshal/unmarshal.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
The message in the sample does not correspond to any known method call. The spec does not mention what to do with messages like this, but all existing usage code simply drops it.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Omitting the check is only useful for custom unmarshaler.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This appears to add *one single entry* compared to the message before it. The inefficiency of this protocol is beyond imagination.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This message follows the other Client::Info event before it. No idea why.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Everything is already supported, as usual.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Very straightforward type, everything is already supported.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
NULL values have special case in the format. This check ensures correctness serialising nil pointers.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
These are not directly related but are first encountered on the same message in the capture.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
The POD itself is serialised without requiring a special case, however its presence is only indicated by the difference in size recorded in the header and payload.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Thankfully no special case here.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is, in fact, just a glorified Int type.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This prevents incorrectly reading trailing data as part of the current POD.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This covers cases where wire size is not known ahead of time.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This performs the check within the bounds of the POD only. This was not caught since spa_dict was only used as the final struct field until now.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Leftover values from previous invocations cause incorrect behaviour here.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
Once again, already entirely supported, the offset is not yet fully verified but makes intuitive sense. Will verify this on future occurrences of the message.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This struct is entirely supported, so this change is very straightforward.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
These get very big later on, and would be painful to represent as the compound literal.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|
|
This is the second message on the captured sample.
Signed-off-by: Ophestra <cat@gensokyo.uk>
|