util

package
v0.1.25 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitArray

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

BitArray provides support for bitmask manipulations.

func NewBitArray

func NewBitArray(sizeBits uint32) BitArray

NewBitArray returns a new BitArray. It takes sizeBits as parameter which represents the size of the underlying bitmask.

func (*BitArray) GetBit

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

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

func (*BitArray) GetBitValue

func (b *BitArray) GetBitValue(i int, j int) uint64

GetBitValue returns a subsection of the bitmask.

func (*BitArray) Marshal

func (b *BitArray) Marshal() []byte

Marshal returns the underlying bitmask.

func (*BitArray) SetBit

func (b *BitArray) SetBit(bitIndex uint32, bitValue 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