Encoder Pace setter / Traffic Shaper based on remaining free WiFi Tx_buffer free slots#450
Open
tipoman9 wants to merge 1 commit intosvpcom:masterfrom
Open
Encoder Pace setter / Traffic Shaper based on remaining free WiFi Tx_buffer free slots#450tipoman9 wants to merge 1 commit intosvpcom:masterfrom
tipoman9 wants to merge 1 commit intosvpcom:masterfrom
Conversation
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.
This is intended to work with this patch libc0607/rtl88x2eu-20230815#15
Integrated a reactive Traffic Shaper into the data_source loop to enforce physical-layer pacing. The logic prevents lost Tx packets by stalling the injection process when the WiFi driver's hardware transmission buffers are near saturation.
When unix sockets are used to feed data to wfb_tx, this propagates back to the video encoder and makes it decrease the output bitrate (usually by simply dropping frames)
This will work only if mmaps on /dev/wifi_tx_buffer_free_frames device on startup succeeds, the latter would be exposed only if a patched driver is used with a module param
ShareTxBufLen = 1Added a new counter count_p_wait_tx_buffer to the IPC_MSG stats. This allows real-time monitoring of how many times the shaper had to intervene, which is critical for tuning encoder bitrates.
If you feel this logic doesn't align with the core goals of wfb-ng, I completely understand. In that case, we can simply apply it as a patch during the OpenIPC firmware build process instead.