fix #821: raise default max_packet_size for multitrack support#833
Closed
Ayoub-glitsh wants to merge 1 commit into
Closed
fix #821: raise default max_packet_size for multitrack support#833Ayoub-glitsh wants to merge 1 commit into
Ayoub-glitsh wants to merge 1 commit into
Conversation
The default max_packet_size of 2048 bytes is too small for multitrack audio. For example, 8 channels at 48kHz with the default 5ms packet length requires ~3904 bytes (240 samples x 8 channels x 2 bytes + RTP header), causing packetizer to fail with 'can't prepare packet'. Changes: - Raise ContextConfig default max_packet_size from 2048 to 16384 bytes, which covers up to ~34 channels at 48kHz/5ms/16-bit PCM - Improve error message in Packetizer::create_packet_() to include payload_size and buffer_capacity, and hint to increase max_packet_size
|
🤖 Pull request is not targeted to |
Member
|
The should definately be treated, but I'd rather pick a solution that handles possible packet framentations more explicit. Closing this PR, and let's discuss it further in the issue |
Author
|
Got it, thanks for the quick review! |
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.
Fixes #821
The default
max_packet_sizeof 2048 bytes is too small for multitrackaudio. For example, 8 channels at 48kHz with the default 5ms packet
length requires ~3904 bytes (240 samples × 8 channels × 2 bytes + RTP
header), causing the packetizer to silently fail with "can't prepare packet".
Changes:
ContextConfigdefaultmax_packet_sizefrom 2048 to 16384 bytes,which covers up to ~34 channels at 48kHz/5ms/16-bit PCM without any
manual configuration
Packetizer::create_packet_()to includepayload_sizeandbuffer_capacity, and hint the user to increasemax_packet_sizeif they do hit the limit