Help us shape the future of Go! Take the 2026 Go Developer Survey

testutils

package
v1.13.11 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestOpusCodec = webrtc.RTPCodecCapability{
	MimeType:  "audio/opus",
	ClockRate: 48000,
}
View Source
var TestVP8Codec = webrtc.RTPCodecCapability{
	MimeType:  "video/vp8",
	ClockRate: 90000,
}
View Source
var TestVP8DecodeTargets = []buffer.DependencyDescriptorDecodeTarget{
	{Target: 2, Layer: buffer.VideoLayer{Temporal: 2}},
	{Target: 1, Layer: buffer.VideoLayer{Temporal: 1}},
	{Target: 0, Layer: buffer.VideoLayer{Temporal: 0}},
}

TestVP8DecodeTargets are the decode targets of libwebrtc's three layer VP8 structure, sorted from high to low.

Functions

func GetTestExtPacket

func GetTestExtPacket(params *TestExtPacketParams) (*buffer.ExtPacket, error)

func GetTestExtPacketVP8

func GetTestExtPacketVP8(params *TestExtPacketParams, vp8 *codec.VP8) (*buffer.ExtPacket, error)

func GetTestExtPacketVP8DD added in v1.13.10

func GetTestExtPacketVP8DD(params *TestExtPacketParams, ddParams *TestDDParams) (*buffer.ExtPacket, error)

GetTestExtPacketVP8DD returns a VP8 packet with a dependency descriptor and the minimized VP8 payload descriptor that libwebrtc sends with it: no TID, no Y bit and no picture ID.

Types

type TestDDParams added in v1.13.10

type TestDDParams struct {
	FirstPacketInFrame bool
	ExtFrameNum        uint64
	TemporalID         int
	// decode target indications as one character per decode target: S, R, D or -
	DTIs          string
	FrameDiffs    []int
	DecodeTargets []buffer.DependencyDescriptorDecodeTarget
}

type TestExtPacketParams

type TestExtPacketParams struct {
	Marker         bool
	IsKeyFrame     bool
	PayloadType    uint8
	SequenceNumber uint16
	SNCycles       int
	Timestamp      uint32
	TSCycles       int
	SSRC           uint32
	PayloadSize    int
	PaddingSize    byte
	ArrivalTime    time.Time
	VideoLayer     buffer.VideoLayer
	IsOutOfOrder   bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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