Experimental HomeKit Secure Video open-source (WebRTC + HEVC + CMAF recording) - #2343
Open
rursache wants to merge 8 commits into
Open
Experimental HomeKit Secure Video open-source (WebRTC + HEVC + CMAF recording)#2343rursache wants to merge 8 commits into
rursache wants to merge 8 commits into
Conversation
InitIID keeps packed IIDs for legacy 3-char types so existing pairings stay valid, and assigns sequential high-range IIDs for 4-char types from the HKSV open-source guide. Also add write-response permission helpers and boolean TLV8 encode/decode
Implements the Developer Preview 17.99 services and characteristics from Apple's HomeKit Secure Video Open Source Compatibility Guide: camera capabilities, multi-tier RTP/WebRTC stream management with mandatory HEVC tiers, buffer/key/cert management, and accessory builder
Session manager implements solicit-offer, provide-answer, reoffer, update-session, end, SFrame key storage, and CMAF client CSR/cert provisioning. Skip empty-string TLV8 fields so optional values do not emit zero-length items. Consumer accepts H.265 tracks for HKSV
HomeKit server handles WebRTC/multi-tier/buffer/cert characteristics with HAP write-response, streaming gates, and stream consumer attach. Enable with homekit.<stream>.hksv: true (capabilities version 17.99)
Cover TLV8 round-trips, accessory service inventory, WebRTC session lifecycle, CSR generation, and README/config examples for issue 2297
Wire the open-source Secure Video recording path end to end: credentials (CSR/cert/keys/publishing point), 8s ring pre-buffer, fMP4 clip builder, DASH-IF mTLS ingest client, event queue, and buffer activity/upload handlers on the HomeKit server when hksv is on Refs: AlexxIT#2297
Expand unit coverage for buffer trim, concurrent push, clip encrypt, upload cancel/stop, empty buffer, missing publishing point, and CMAF error mapping. Run clean under -race. Emit 0x00 TLV item separators to match real HomeKit accessories and golden dumps; keep unmarshaling 0xFF for interoperability. Fix buffer Stop so it does not replace in-flight sessions
Cover CSR/cert, keys, publishing point, buffer activity/upload/events, WebRTC solicit/privacy/end, RTP control, invalid TLV, and concurrent access through SetCharacteristic/GetCharacteristic without a real hub Serialize wrValues and related characteristic updates under wrMu so handler paths stay race-free. Accept empty TLV on unmarshal for valid empty write-responses
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Implements the HAP services from Apple's HomeKit Secure Video Open Source Compatibility Guide (Developer Preview, capabilities
17.99) for issue #2297Closes nothing yet (experimental). Tracking: #2297
What is included
Config
Without
hksv: truebehavior is unchanged (classic H264 RTP HomeKit camera)Notes
Test plan
hksv: trueon a real Apple Home hub (developer account / preview)