Documentation ¶
Index ¶
- Constants
- type CipherID
- type KDF
- type RTCPCompoundPacket
- func (p *RTCPCompoundPacket) Clone() *RTCPCompoundPacket
- func (p *RTCPCompoundPacket) DecryptGCM(key, salt []byte) error
- func (p *RTCPCompoundPacket) EncryptGCM(key, salt []byte) error
- func (p *RTCPCompoundPacket) GetBuffer() []byte
- func (p *RTCPCompoundPacket) GetE() bool
- func (p *RTCPCompoundPacket) GetESRTCPWord() []byte
- func (p *RTCPCompoundPacket) GetHeader() *RTCPHeader
- func (p *RTCPCompoundPacket) GetPackets() []*RTCPPacket
- func (p *RTCPCompoundPacket) GetSRTCPIndex() uint32
- type RTCPHeader
- func (p *RTCPHeader) Clone() *RTCPHeader
- func (p *RTCPHeader) GetLength() uint16
- func (p *RTCPHeader) GetLengthInBytes() int
- func (p *RTCPHeader) GetPT() RTCPTypeClass
- func (p *RTCPHeader) GetRC() int
- func (p *RTCPHeader) GetSenderSSRC() uint32
- func (p *RTCPHeader) SetLength(length uint16)
- func (p *RTCPHeader) SetPT(pt RTCPTypeClass)
- func (p *RTCPHeader) SetSenderSSRC(ssrc uint32)
- type RTCPPacket
- type RTCPTypeClass
- type RTPPacket
- func (p *RTPPacket) Clone() *RTPPacket
- func (p *RTPPacket) DecryptGCM(roc uint32, key, salt []byte) error
- func (p *RTPPacket) EncryptGCM(roc uint32, key, salt []byte) error
- func (p *RTPPacket) GetCC() int
- func (p *RTPPacket) GetCSRC() []uint32
- func (p *RTPPacket) GetExtBit() bool
- func (p *RTPPacket) GetExtClientVolume(s *RTPSession) (vad bool, dBov int8)
- func (p *RTPPacket) GetGeneralExt(num int) []byte
- func (p *RTPPacket) GetHdrExt() (extNum uint16, ext []byte)
- func (p *RTPPacket) GetHdrExtLen() (extLen int)
- func (p *RTPPacket) GetMarker() bool
- func (p *RTPPacket) GetOHB() (pt int8, seq uint16, m bool)
- func (p *RTPPacket) GetOHBLen() int
- func (p *RTPPacket) GetPT() int8
- func (p *RTPPacket) GetPad() bool
- func (p *RTPPacket) GetPayload() []byte
- func (p *RTPPacket) GetSSRC() uint32
- func (p *RTPPacket) GetSeq() uint16
- func (p *RTPPacket) GetTimestamp() uint32
- func (p *RTPPacket) SetCC(cc int) error
- func (p *RTPPacket) SetCSRC(csrc []uint32) error
- func (p *RTPPacket) SetExtBit(x bool) error
- func (p *RTPPacket) SetExtClientVolume(s *RTPSession, vad bool, dBov int8) error
- func (p *RTPPacket) SetGeneralExt(num int, data []byte) error
- func (p *RTPPacket) SetHdrExt(extNum uint16, ext []byte) error
- func (p *RTPPacket) SetMarker(marker bool) error
- func (p *RTPPacket) SetOHB(pt int8, seq uint16, m bool) error
- func (p *RTPPacket) SetPT(pt int8) error
- func (p *RTPPacket) SetPad(marker bool) error
- func (p *RTPPacket) SetPadding(sizeMult int) error
- func (p *RTPPacket) SetPayload(payload []byte) error
- func (p *RTPPacket) SetSSRC(ssrc uint32) error
- func (p *RTPPacket) SetSeq(seq uint16) error
- func (p *RTPPacket) SetTimestamp(ts uint32) error
- func (p *RTPPacket) String() string
- type RTPSession
- func (s *RTPSession) Decode(packetData []byte) (*RTPPacket, error)
- func (s *RTPSession) DecodeRTCP(packetData []byte) (*RTCPCompoundPacket, error)
- func (s *RTPSession) Encode(p *RTPPacket) ([]byte, error)
- func (s *RTPSession) EncodeRTCP(p *RTCPCompoundPacket) ([]byte, error)
- func (s *RTPSession) NewRtcpRR() (*RTPPacket, error)
- func (s *RTPSession) SetExtMap(num int, name string) error
- func (s *RTPSession) SetSRTP(cipher CipherID, useEKT bool, masterKey, masterSalt []byte) error
- type Ssrc
Constants ¶
View Source
const ( Ke byte = 0x00 Ka byte = 0x01 Ks byte = 0x02 KCe byte = 0x03 KCa byte = 0x04 KCs byte = 0x05 )
View Source
const (
MTU = 1500
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CipherID ¶
type CipherID uint16
const ( // From https://www.iana.org/assignments/srtp-protection/srtp-protection.xhtml NONE CipherID = 0x0000 SRTP_AEAD_AES_128_GCM CipherID = 0x0007 SRTP_AEAD_AES_256_GCM CipherID = 0x0008 DOUBLE_AEAD_AES_128_GCM_AEAD_AES_128_GCM CipherID = 0x0009 DOUBLE_AEAD_AES_256_GCM_AEAD_AES_256_GCM CipherID = 0x000a )
type RTCPCompoundPacket ¶
type RTCPCompoundPacket struct {
// contains filtered or unexported fields
}
func NewRTCPCompoundPacket ¶
func NewRTCPCompoundPacket(buffer []byte, srtcpIndex uint32) (*RTCPCompoundPacket, error)
func NewSRTCPPacket ¶
func NewSRTCPPacket(buffer []byte) (*RTCPCompoundPacket, error)
func (*RTCPCompoundPacket) Clone ¶
func (p *RTCPCompoundPacket) Clone() *RTCPCompoundPacket
func (*RTCPCompoundPacket) DecryptGCM ¶
func (p *RTCPCompoundPacket) DecryptGCM(key, salt []byte) error
func (*RTCPCompoundPacket) EncryptGCM ¶
func (p *RTCPCompoundPacket) EncryptGCM(key, salt []byte) error
func (*RTCPCompoundPacket) GetBuffer ¶
func (p *RTCPCompoundPacket) GetBuffer() []byte
func (*RTCPCompoundPacket) GetE ¶
func (p *RTCPCompoundPacket) GetE() bool
func (*RTCPCompoundPacket) GetESRTCPWord ¶
func (p *RTCPCompoundPacket) GetESRTCPWord() []byte
SRTCP access functions
func (*RTCPCompoundPacket) GetHeader ¶
func (p *RTCPCompoundPacket) GetHeader() *RTCPHeader
func (*RTCPCompoundPacket) GetPackets ¶
func (p *RTCPCompoundPacket) GetPackets() []*RTCPPacket
func (*RTCPCompoundPacket) GetSRTCPIndex ¶
func (p *RTCPCompoundPacket) GetSRTCPIndex() uint32
type RTCPHeader ¶
type RTCPHeader struct {
// contains filtered or unexported fields
}
func (*RTCPHeader) Clone ¶
func (p *RTCPHeader) Clone() *RTCPHeader
func (*RTCPHeader) GetLength ¶
func (p *RTCPHeader) GetLength() uint16
func (*RTCPHeader) GetLengthInBytes ¶
func (p *RTCPHeader) GetLengthInBytes() int
func (*RTCPHeader) GetPT ¶
func (p *RTCPHeader) GetPT() RTCPTypeClass
func (*RTCPHeader) GetRC ¶
func (p *RTCPHeader) GetRC() int
func (*RTCPHeader) GetSenderSSRC ¶
func (p *RTCPHeader) GetSenderSSRC() uint32
func (*RTCPHeader) SetLength ¶
func (p *RTCPHeader) SetLength(length uint16)
func (*RTCPHeader) SetPT ¶
func (p *RTCPHeader) SetPT(pt RTCPTypeClass)
func (*RTCPHeader) SetSenderSSRC ¶
func (p *RTCPHeader) SetSenderSSRC(ssrc uint32)
type RTCPPacket ¶
type RTCPPacket struct {
// contains filtered or unexported fields
}
func NewRTCPPacket ¶
func NewRTCPPacket(pt RTCPTypeClass, len uint16, senderSsrc uint32, payload []byte) *RTCPPacket
type RTCPTypeClass ¶
type RTCPTypeClass uint8
const ( RTCPTypeSR RTCPTypeClass = 200 RTCPTypeRR RTCPTypeClass = 201 RTCPTypeSDES RTCPTypeClass = 202 RTCPTypeBYE RTCPTypeClass = 203 RTCPTypeAPP RTCPTypeClass = 204 )
type RTPPacket ¶
type RTPPacket struct {
// contains filtered or unexported fields
}
func NewRTPPacket ¶
func (*RTPPacket) GetExtClientVolume ¶
func (p *RTPPacket) GetExtClientVolume(s *RTPSession) (vad bool, dBov int8)
func (*RTPPacket) GetGeneralExt ¶
func (*RTPPacket) GetHdrExtLen ¶
func (*RTPPacket) GetPayload ¶
func (*RTPPacket) GetTimestamp ¶
func (*RTPPacket) SetExtClientVolume ¶
func (p *RTPPacket) SetExtClientVolume(s *RTPSession, vad bool, dBov int8) error
func (*RTPPacket) SetPadding ¶
func (*RTPPacket) SetPayload ¶
func (*RTPPacket) SetTimestamp ¶
type RTPSession ¶
type RTPSession struct {
// contains filtered or unexported fields
}
func NewRTPSession ¶
func NewRTPSession(rewriteSeq bool) *RTPSession
func (*RTPSession) DecodeRTCP ¶
func (s *RTPSession) DecodeRTCP(packetData []byte) (*RTCPCompoundPacket, error)
func (*RTPSession) EncodeRTCP ¶
func (s *RTPSession) EncodeRTCP(p *RTCPCompoundPacket) ([]byte, error)
func (*RTPSession) NewRtcpRR ¶
func (s *RTPSession) NewRtcpRR() (*RTPPacket, error)
Click to show internal directories.
Click to hide internal directories.