Fix stalled SP/mono upload over Remote NetMD#99
Open
jaeming wants to merge 1 commit into
Open
Conversation
The remote upload path passed the raw recording codec (SPS/SPM) straight to WireformatDict, which only keys on wireformat names (SP/LP2/LP105/LP4). The lookup returned undefined, so the encrypting MDTrack had no frame size, the packet worker produced nothing, and the upload hung at 0%. Mirror the direct-USB path (netmd.ts) by collapsing SPS/SPM to SP before the lookup, matching the existing client/server wireformat contract.
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.
Problem
Uploading a track in SP (or mono SP) over Remote NetMD hangs at 0% forever. The client opens the
/uploadwebsocket but never streams any packets, so the server waits indefinitely.Root cause
RemoteNetMDService.upload()builds the encryptingMDTrackwithWireformatDict[format.codec]. For SP,format.codecis the recording codec nameSPS/SPM, butWireformatDictis keyed on wireformat names (SP/LP2/LP105/LP4). So the lookup returnsundefined,MDTrack.getFrameSize()isundefined,getFrameCount()becomesNaN, and the packet worker produces nothing — the upload stalls.The direct-USB path in
netmd.tsalready handles this by collapsingSPS/SPM→SPbefore the lookup; the remote path just never did the same.Fix
Mirror the direct-USB path: map
SPS/SPM→SPbefore theWireformatDictlookup. This keeps the existing client/server wireformat contract (the server already understandsSP), so no server change is required.AT3handling is unchanged. Mono over remote is uploaded as SP stereo (as it effectively was intended to be sent), which is a separate enhancement.Testing
tsc+vite buildclean.remote-netmd-servernow proceed past 0% instead of hanging; LP2/LP4 (which were already fine) unaffected.