Skip to content

Commit

Permalink
Some more explanatory comments to enforce checkin
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikołaj Małecki committed Sep 19, 2023
2 parents 422cbed + 66e7468 commit fa40417
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions srtcore/srt.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,19 @@ typedef enum SRT_TRANSTYPE
// This is for MPEG TS and it's a default SRTO_PAYLOADSIZE for SRTT_LIVE.
static const int SRT_LIVE_DEF_PLSIZE = 1316; // = 188*7, recommended for MPEG TS

// This is the maximum payload size for Live mode, should you have a different
// payload type than MPEG TS.
// DEPRECATED. Use one of these below instead.
SRT_ATR_DEPRECATED_PX static const int SRT_LIVE_MAX_PLSIZE SRT_ATR_DEPRECATED = 1456; // MTU(1500) - UDP.hdr(28) - SRT.hdr(16)

// These constants define the maximum size of the payload
// in a single UDP packet, depending on the IP version, and
// with the default socket options, that is:
// * default 1500 bytes of MTU (see SRTO_MSS)
// * without FEC packet filter (see SRTO_PACKETFILTER)
// * without AEAD through AES-GCM (see SRTO_CRYPTOMODE)
static const int SRT_MAX_PLSIZE_AF_INET = 1456; // MTU(1500) - IPv4.hdr(20) - UDP.hdr(8) - SRT.hdr(16)
static const int SRT_MAX_PLSIZE_AF_INET6 = 1444; // MTU(1500) - IPv6.hdr(32) - UDP.hdr(8) - SRT.hdr(16)

// A macro for these above in case when the IP family is passed as a runtime value.
#define SRT_MAX_PLSIZE(famspec) ((famspec) == AF_INET ? SRT_MAX_PLSIZE_AF_INET : SRT_MAX_PLSIZE_AF_INET6)

// Latency for Live transmission: default is 120
Expand Down

0 comments on commit fa40417

Please sign in to comment.