Repository navigation
CarLife: support 3.x receivers alongside 4.x - #34
Merged
Merged
Conversation
…nect A 3.3.9 receiver announces protocol 1.0, skips the authentication challenge, sends frame rate 0, and keeps the first frame's parameter sets for its own decoder resets. Select a per-session profile from the announced major: 1.x establishes at video negotiation and receives parameter sets only with the first keyframe of each format; 3.x/4.x keeps the challenge flow and in-band sets on every keyframe. Keyframes for the legacy profile start with the IDR slice so the receiver's reset path can prepend its stored SPS/PPS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Select a per-session receiver profile from the major version the head unit announces in 98305, so the same CarLife sender serves both the 3.x and 4.x generations without configuration.
LegacyCurrentAny other major is rejected as
version_mismatch, with the boundedversion_rejected major=... minor=...diagnostic from #33.Root cause
A 3.3.9 receiver announces protocol 1.0 and has no authentication challenge, so the previous sender closed the session at
version_mismatch. Once accepted, it still never decoded: the receiver stores the first frame's SPS/PPS and, after a decoder reset, only accepts a keyframe whose first NAL is the IDR slice; a sender that repeats SPS/PPS on every keyframe makes it discard every frame (DecodeUtil: decoder resetper frame). The 3.x receiver also sends frame rate 0 in 98311, which the old clamp turned into 1 fps.Changes
ReceiverProfile.kt: profile selection plus the two behavioural differences (challenge, parameter-set policy).CarlifeSession.kt: profile selection from 98305; bounded rejection diagnostic preserved; 3.x establishes at video negotiation; frame rate 0 means the configured default; 98389 status codes logged aspeer_code.CarlifeOutput.kt: per-profile keyframe shaping; parameter-set state resets on session and source-format change.Validation
:carlife:testand:devrelay:testpass after rebasing ontomain.Currentbranch and covered by unit tests; a live 4.0 reinstall stopped in its own "connecting 0%" state, so it was not used as a signal.