MCPcopy Create free account
hub / github.com/pion/rtcp / setupBlockHeader

Method setupBlockHeader

extended_report.go:455–469  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

453}
454
455func (b *StatisticsSummaryReportBlock) setupBlockHeader() {
456 b.XRHeader.BlockType = StatisticsSummaryReportBlockType
457 b.XRHeader.TypeSpecific = 0x00
458 if b.LossReports {
459 b.XRHeader.TypeSpecific |= 0x80
460 }
461 if b.DuplicateReports {
462 b.XRHeader.TypeSpecific |= 0x40
463 }
464 if b.JitterReports {
465 b.XRHeader.TypeSpecific |= 0x20
466 }
467 b.XRHeader.TypeSpecific |= TypeSpecificField((b.TTLorHopLimit & 0x03) << 3)
468 b.XRHeader.BlockLength = uint16(wireSize(b)/4 - 1) //nolint:gosec // G115
469}
470
471func (b *StatisticsSummaryReportBlock) unpackBlockHeader() {
472 b.LossReports = b.XRHeader.TypeSpecific&0x80 != 0

Callers

nothing calls this directly

Calls 2

TypeSpecificFieldTypeAlias · 0.85
wireSizeFunction · 0.85

Tested by

no test coverage detected