Documentation ¶
Index ¶
- Constants
- func NTP2UtcClock(ntp uint64) time.Time
- func UtcClockToNTP(t time.Time) uint64
- type App
- type Bye
- type ChunkItem
- type Comm
- type ReceiverReport
- type ReportBlock
- type RtcpContext
- func (ctx *RtcpContext) GenerateApp(name string, data []byte) *App
- func (ctx *RtcpContext) GenerateBye() *Bye
- func (ctx *RtcpContext) GenerateRR() *ReceiverReport
- func (ctx *RtcpContext) GenerateSDES(sdesType uint8, txt string) *SourceDescription
- func (ctx *RtcpContext) GenerateSR() *SenderReport
- func (ctx *RtcpContext) ReceivedRtp(pkt *rtp.RtpPacket)
- func (ctx *RtcpContext) ReceivedSR(sr *SenderReport)
- func (ctx *RtcpContext) SendRtp(pkt *rtp.RtpPacket)
- type SDESChunk
- type SenderReport
- type SourceDescription
Constants ¶
View Source
const ( MIN_SEQUENTIAL = 2 RTP_SEQ_MOD = 1 << 16 MAX_DROPOUT = 3000 MAX_MISORDER = 100 )
View Source
const ( SDES_CNAME = 1 SDES_NAME = 2 SDES_EMAIL = 3 SDES_PHONE = 4 SDES_LOC = 5 SDES_TOOL = 6 SDES_NOTE = 7 SDES_PRIV = 8 )
View Source
const ( RTCP_SR = 200 RTCP_RR = 201 RTCP_SDES = 202 RTCP_BYE = 203 RTCP_APP = 204 )
Variables ¶
This section is empty.
Functions ¶
func NTP2UtcClock ¶
func UtcClockToNTP ¶
Types ¶
type ChunkItem ¶
func MakeCNameItem ¶
type ReceiverReport ¶
type ReceiverReport struct { Comm RC uint8 SSRC uint32 Blocks []ReportBlock }
func NewReceiverReport ¶
func NewReceiverReport() *ReceiverReport
func (*ReceiverReport) Decode ¶
func (pkt *ReceiverReport) Decode(data []byte) error
func (*ReceiverReport) Encode ¶
func (pkt *ReceiverReport) Encode() []byte
type ReportBlock ¶
type ReportBlock struct { SSRC uint32 Fraction uint8 Lost uint32 ExtendHighestSeq uint32 Jitter uint32 Lsr uint32 Dlsr uint32 }
func (*ReportBlock) Decode ¶
func (rb *ReportBlock) Decode(data []byte) error
func (*ReportBlock) Encode ¶
func (rb *ReportBlock) Encode() []byte
type RtcpContext ¶
type RtcpContext struct {
// contains filtered or unexported fields
}
func NewRtcpContext ¶
func NewRtcpContext(ssrc uint32, seq uint16, sampleRate uint32) *RtcpContext
func (*RtcpContext) GenerateApp ¶
func (ctx *RtcpContext) GenerateApp(name string, data []byte) *App
func (*RtcpContext) GenerateBye ¶
func (ctx *RtcpContext) GenerateBye() *Bye
func (*RtcpContext) GenerateRR ¶
func (ctx *RtcpContext) GenerateRR() *ReceiverReport
func (*RtcpContext) GenerateSDES ¶
func (ctx *RtcpContext) GenerateSDES(sdesType uint8, txt string) *SourceDescription
func (*RtcpContext) GenerateSR ¶
func (ctx *RtcpContext) GenerateSR() *SenderReport
func (*RtcpContext) ReceivedRtp ¶
func (ctx *RtcpContext) ReceivedRtp(pkt *rtp.RtpPacket)
func (*RtcpContext) ReceivedSR ¶
func (ctx *RtcpContext) ReceivedSR(sr *SenderReport)
func (*RtcpContext) SendRtp ¶
func (ctx *RtcpContext) SendRtp(pkt *rtp.RtpPacket)
type SenderReport ¶
type SenderReport struct { Comm RC uint8 SSRC uint32 NTP uint64 RtpTimestamp uint32 SendPacketCount uint32 SendOctetCount uint32 Blocks []ReportBlock }
func NewSenderReport ¶
func NewSenderReport() *SenderReport
func (*SenderReport) Decode ¶
func (pkt *SenderReport) Decode(data []byte) error
func (*SenderReport) Encode ¶
func (pkt *SenderReport) Encode() []byte
type SourceDescription ¶
func NewSourceDescription ¶
func NewSourceDescription() *SourceDescription
func (*SourceDescription) Decode ¶
func (pkt *SourceDescription) Decode(data []byte) error
func (*SourceDescription) Encode ¶
func (pkt *SourceDescription) Encode() []byte
Click to show internal directories.
Click to hide internal directories.