Documentation ¶
Index ¶
- func ExpandCounter(truncated, width uint64, latest *uint64) uint64
- func IsVP8Keyframe(packet rtp.Packet) bool
- type ExpandedPacketIdentifiers
- type PacketRewriter
- type RewrittenRTPPacket
- type TruncatedPacketIdentifiers
- func (p TruncatedPacketIdentifiers) Add(delta TruncatedPacketIdentifiers) TruncatedPacketIdentifiers
- func (p TruncatedPacketIdentifiers) Max(other TruncatedPacketIdentifiers) TruncatedPacketIdentifiers
- func (p TruncatedPacketIdentifiers) Sub(delta TruncatedPacketIdentifiers) TruncatedPacketIdentifiers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandCounter ¶
Expands a counter (whether it's a sequence number, timestamp or any other counter) into an expanded counter using the latest observed counter value for a calculation. It's impossible to reliably extend the counter without knowing the "max" value of the previously observed counter (i.e. the latest counter value). This function also updates the value of the latest observed counter. Returns expanded counter value that can be casted to any smaller type. The `width` defines the width of the truncated counter in bits.
func IsVP8Keyframe ¶
Determines if a given packet contains a VP8 keyframe.
Types ¶
type ExpandedPacketIdentifiers ¶
type ExpandedPacketIdentifiers struct {
// contains filtered or unexported fields
}
Expanded identifiers after taking into account the rollover.
func (ExpandedPacketIdentifiers) Add ¶
func (p ExpandedPacketIdentifiers) Add(delta ExpandedPacketIdentifiers) ExpandedPacketIdentifiers
Add the given delta to the identifiers.
func (ExpandedPacketIdentifiers) Max ¶
func (p ExpandedPacketIdentifiers) Max(other ExpandedPacketIdentifiers) ExpandedPacketIdentifiers
Returns the maximum value of both.
func (ExpandedPacketIdentifiers) Sub ¶
func (p ExpandedPacketIdentifiers) Sub(delta ExpandedPacketIdentifiers) ExpandedPacketIdentifiers
Subtract the given delta from the identifiers.
type PacketRewriter ¶
type PacketRewriter struct {
// contains filtered or unexported fields
}
A structure that is used to rewrite the RTP packets that are being forwarded.
func NewPacketRewriter ¶
func NewPacketRewriter() *PacketRewriter
Creates a new instance of the `PacketRewriter`.
func (*PacketRewriter) ProcessIncoming ¶
func (p *PacketRewriter) ProcessIncoming(packet rtp.Packet) RewrittenRTPPacket
Process new incoming packet.
type RewrittenRTPPacket ¶
type TruncatedPacketIdentifiers ¶
type TruncatedPacketIdentifiers struct {
// contains filtered or unexported fields
}
Holds values required for the proper calculation of RTP IDs. These are the values that are being overwritten in the RTP packets.
func (TruncatedPacketIdentifiers) Add ¶
func (p TruncatedPacketIdentifiers) Add(delta TruncatedPacketIdentifiers) TruncatedPacketIdentifiers
Add the given delta to the identifiers.
func (TruncatedPacketIdentifiers) Max ¶
func (p TruncatedPacketIdentifiers) Max(other TruncatedPacketIdentifiers) TruncatedPacketIdentifiers
Returns the maximum value of both.
func (TruncatedPacketIdentifiers) Sub ¶
func (p TruncatedPacketIdentifiers) Sub(delta TruncatedPacketIdentifiers) TruncatedPacketIdentifiers
Subtract the given delta from the identifiers.