util

package
v0.1.31 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: MIT Imports: 1 Imported by: 1

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 {
	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