Note! This request to be discussed.
As an SRT user, I would like to specify the receiver buffer size relative to the payload being transmitted.
As of now, the value provided via SRTO_RCVBUF is converted internally to the number of packets.
The conversion is done dividing the option value by (MTU - UDP_HDR_SIZE), where UDP_HDR_SIZE = 28 (20 bytes IPv4 + 8 bytes of UDP).
num_pkts = SRTO_RCVBUF / (MTU - UDP_HDR_SIZE)
As a user, I want to provide the buffer size to receive my streaming, and I am mainly concerned about the payload, not the payload + SRT header.
Note that CUnitQueue allocates the memory for the receiver buffer. It actually allocates num_pkts * max_payload_size, while SRT Packet Header is implicitly allocated with each CUnit that holds the CPacket structure.
So effectively the allocated memory is num_pkts * (max_payload_size + SRT_HDR_SIZE).
Proposed behavior
The resulting number of packets is increased.
num_pkts = SRTO_RCVBUF / (MTU - UDP_HDR_SIZE - SRT_HDR_SIZE)
SRT Version: v1.4.1.
Note! This request to be discussed.
As an SRT user, I would like to specify the receiver buffer size relative to the payload being transmitted.
As of now, the value provided via
SRTO_RCVBUFis converted internally to the number of packets.The conversion is done dividing the option value by
(MTU - UDP_HDR_SIZE), whereUDP_HDR_SIZE = 28(20 bytes IPv4 + 8 bytes of UDP).As a user, I want to provide the buffer size to receive my streaming, and I am mainly concerned about the payload, not the payload + SRT header.
Note that
CUnitQueueallocates the memory for the receiver buffer. It actually allocatesnum_pkts * max_payload_size, while SRT Packet Header is implicitly allocated with eachCUnitthat holds theCPacketstructure.So effectively the allocated memory is
num_pkts * (max_payload_size + SRT_HDR_SIZE).Proposed behavior
The resulting number of packets is increased.
SRT Version: v1.4.1.