Repository navigation
feat(audio): add negotiated and authenticated live MAT transport #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
0d5b782
feat(audio): add explicit finite MAT dump and playback transport
qiin2333 82cd945
merge(mic): preserve upstream RTSP parser and MAT duplicate guards
qiin2333 cdd4aae
docs(audio): document upstream RTSP merge ownership and regression
qiin2333 0396c08
fix(audio): satisfy strict MAT dump compilation on Linux CI
qiin2333 773bebd
fix(audio): preserve platform CRT setup before MAT headers
qiin2333 05415ed
feat(audio): negotiate preferred MAT or Opus before media startup
qiin2333 1ac0089
feat(audio): negotiate and authenticate continuous live MAT streams
qiin2333 2819376
test(audio): keep live MAT receiver tests independent of DLL exports
qiin2333 8a51e97
fix(audio): reject finite metadata in live MAT confirmation
qiin2333 c6b3404
refactor(audio): keep MAT file and offline input policy outside commo…
qiin2333 7078c4b
fix(audio): guard MAT inactivity and supported static builds
qiin2333 62c0bcf
refactor(audio): keep only live MAT production transport
qiin2333 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # Live MAT transport boundary - 2026-10-23 | ||
|
|
||
| This PR targets **mic**. It owns negotiation, authenticated live transport, | ||
| bounded reassembly and synchronous cycle/EOS callbacks. It does not own files, | ||
| offline input, native capture, encoding or hardware rendering. | ||
|
|
||
| - Codec 7 / `mat-live-v1` uses HKDF-SHA256, AES-128-GCM with authenticated headers | ||
| and a 64-bit packet counter. RTP/FEC operates on ciphertext; authentication | ||
| precedes reassembly. Loss, corruption, gaps and consumer failure are terminal. | ||
| - Local MAT preference 6 selects live7 or Opus0 before ANNOUNCE. After selection | ||
| there is no codec change. Removed finite codec IDs 4/5 fail before networking; | ||
| they are reserved and must not be reused. Old finite-only hosts cause AUTO to | ||
| select Opus; stale or mismatched MAT acknowledgements fail the handshake. | ||
| - Carrier `iec61937-192000-8-s16le` carries 61,440 bytes per 20 ms cycle. The SMAT | ||
| clock is 48,000 Hz / 960 ticks per cycle. RTP fragment ticks are not media PTS. | ||
| - `LiSetMatPlaybackCallbacks` registers the live consumer during audio init and | ||
| is cleared after threads join. Consumers copy borrowed bytes before returning; | ||
| zero means failure. The end callback requires authenticated, complete END and | ||
| must finish any bounded drain before returning success. Closing or timing out | ||
| cannot synthesize successful EOS. | ||
| - The two-second watchdog measures accepted live input. It stops only after | ||
| verified END, before the consumer drain. Its timestamp is loaded before the | ||
| clock to avoid racing a newer publication. Unrelated Opus behavior is retained. | ||
| - Finite profile negotiation, SHA/count receiver, recording APIs and finish | ||
| polling are removed. Standalone file checks and mock offline input live in the | ||
| parent Sunshine `spatial-object-spike/mat-diagnostics` directory. | ||
|
|
||
| Static CTest has 13 tests, including live callback failures, missing END timeout, | ||
| drain semantics, RTP wrap/FEC, authenticated integrity and strict RTSP parser | ||
| uniqueness. Windows CI also builds/runs static tests with MSVC C11 atomics. | ||
| Parent software acceptance adds an independent crypto oracle, actual UDP receive | ||
| threads, controlled RTSP negotiation, source/pipe contracts and diagnostics. | ||
|
|
||
| Rebuild consumers after these unpublished API removals. The historical Android | ||
| app remains pinned to its previous shared revision; current clients are mocks. | ||
| Generated bytes establish software behavior only. Earlier finite replay/native | ||
| reports do not establish current native capture, hardware playback or Atmos | ||
| recognition. Historical APIs/results are available in Git history. |
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.