util

package
v0.1.51 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 1 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package util implements utilities to better support Fec decoding / encoding.

nolint: revive, staticcheck

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitArray

type BitArray struct {
	Lo uint64 // leftmost 64 bits
	Hi uint64 // rightmost 64 bits
}

BitArray provides support for bitmask manipulations.

func (*BitArray) GetBit

func (b *BitArray) GetBit(bitIndex uint32) uint8

GetBit returns the bit value at a specified index of the bitmask.

func (*BitArray) Reset added in v0.1.26

func (b *BitArray) Reset()

Reset clears the bitmask.

func (*BitArray) SetBit

func (b *BitArray) SetBit(bitIndex uint32)

SetBit sets a bit to the specified bit value on the bitmask.

type MediaPacketIterator

type MediaPacketIterator struct {
	// contains filtered or unexported fields
}

MediaPacketIterator supports iterating through a list of media packets protected by a specific Fec packet.

func NewMediaPacketIterator

func NewMediaPacketIterator(mediaPackets []rtp.Packet, coveredIndices []uint32) *MediaPacketIterator

NewMediaPacketIterator returns a new MediaPacketIterator.

func (*MediaPacketIterator) First

func (m *MediaPacketIterator) First() *rtp.Packet

First returns the first media packet to iterate through.

func (*MediaPacketIterator) HasNext

func (m *MediaPacketIterator) HasNext() bool

HasNext indicates whether or not there are more media packets that can be iterated through.

func (*MediaPacketIterator) Next

func (m *MediaPacketIterator) Next() *rtp.Packet

Next returns the next media packet to iterate through.

func (*MediaPacketIterator) Reset

Reset sets the starting iterating index back to 0.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL