Skip to content

v0.4.0

Choose a tag to compare

@rudyberends rudyberends released this 11 Aug 22:37
· 4 commits to main since this release
feat(controlpoint): ask a renderer which formats it accepts (v0.4.0)

A UPnP renderer publishes what it can decode as protocolInfo entries in its
ConnectionManager's Sink list, and asking is the only way to know whether a stream will
play before sending it: a renderer handed something it cannot decode does not complain,
it plays silence. Without this, a caller can only guess or be configured.

- discovery now resolves the ConnectionManager control URL alongside AVTransport and
  RenderingControl; the service parsing was already generic, so this is one more lookup.
- DlnaControlPoint.getSinkContentTypes() invokes GetProtocolInfo and returns the MIME
  types, cached — the sink list is a property of the device, not of a session.
- parseSinkContentTypes() is exported and takes the *third colon-separated field* of
  each entry rather than searching the raw string, so `audio/flac` cannot be found
  inside some other token, and it keeps parameterised types (`audio/L16;rate=44100`)
  intact.

Returns null — not an empty array — when the device has no ConnectionManager, does not
answer, or answers unparseably. "It told us nothing" and "it accepts nothing" must not
read the same to a caller deciding what to send.