Skip to content

fix: parse multiple audioStreamMode entries in TalkAbility (#371)#415

Open
nythtech-nl wants to merge 1 commit into
QuantumEntangledAndy:masterfrom
nythtech-nl:fix-371-talkability-audiostreammode
Open

fix: parse multiple audioStreamMode entries in TalkAbility (#371)#415
nythtech-nl wants to merge 1 commit into
QuantumEntangledAndy:masterfrom
nythtech-nl:fix-371-talkability-audiostreammode

Conversation

@nythtech-nl

Copy link
Copy Markdown

Problem

neolink talk fails for the Reolink Video Doorbell with:

ERROR neolink_core::bc::de] e: Custom("duplicate field `audioStreamMode`")
Error: Camera <name> does not support talk

The doorbell's TalkAbility response advertises two <audioStreamMode> values:

<audioStreamModeList>
  <audioStreamMode>followVideoStream</audioStreamMode>
  <audioStreamMode>mixAudioStream</audioStreamMode>
</audioStreamModeList>

but AudioStreamModeList.audio_stream_mode is a single String, so serde rejects the second element as a duplicate field and neolink wrongly concludes the camera cannot talk.

Fixes #371.

Fix

  • Make AudioStreamModeList.audio_stream_mode a Vec<String> (#[serde(default)]).
  • Select the first advertised mode when building TalkConfig.

Testing

Built from this branch and ran neolink talk against a Reolink Video Doorbell behind an RLN12W NVR (talk routed via channel_id). Before: "does not support talk". After: TalkAbility parses, the talk pipeline streams, and audio plays from the doorbell speaker. Cameras that advertise a single mode are unaffected (.first() yields the same value).

…tangledAndy#371)

The Reolink Video Doorbell advertises more than one <audioStreamMode> in
its TalkAbility response (followVideoStream and mixAudioStream). The
deserializer modelled audio_stream_mode as a single String, so the second
element triggered serde's "duplicate field audioStreamMode" error and
neolink wrongly reported "does not support talk".

Make AudioStreamModeList.audio_stream_mode a Vec<String> and select the
first advertised mode when building the TalkConfig.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

duplicate field audioStreamMode

1 participant