unit

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package unit contains the Unit definition.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AV1

type AV1 struct {
	Base
	TU [][]byte
}

AV1 is an AV1 data unit.

type Base

type Base struct {
	RTPPackets []*rtp.Packet
	NTP        time.Time
	PTS        time.Duration
}

Base contains fields shared across all units.

func (*Base) GetNTP

func (u *Base) GetNTP() time.Time

GetNTP implements Unit.

func (*Base) GetPTS

func (u *Base) GetPTS() time.Duration

GetPTS implements Unit.

func (*Base) GetRTPPackets

func (u *Base) GetRTPPackets() []*rtp.Packet

GetRTPPackets implements Unit.

type Generic

type Generic struct {
	Base
}

Generic is a generic data unit.

type H264

type H264 struct {
	Base
	AU [][]byte
}

H264 is a H264 data unit.

type H265

type H265 struct {
	Base
	AU [][]byte
}

H265 is a H265 data unit.

type MPEG1Audio

type MPEG1Audio struct {
	Base
	Frames [][]byte
}

MPEG1Audio is a MPEG-1/2 Audio data unit.

type MPEG4AudioGeneric

type MPEG4AudioGeneric struct {
	Base
	AUs [][]byte
}

MPEG4AudioGeneric is a MPEG-4 Audio data unit.

type MPEG4AudioLATM

type MPEG4AudioLATM struct {
	Base
	AU []byte
}

MPEG4AudioLATM is a MPEG-4 Audio data unit.

type Opus

type Opus struct {
	Base
	Packets [][]byte
}

Opus is a Opus data unit.

type Unit

type Unit interface {
	// returns RTP packets contained into the unit.
	GetRTPPackets() []*rtp.Packet

	// returns the NTP timestamp of the unit.
	GetNTP() time.Time

	// returns the PTS of the unit.
	GetPTS() time.Duration
}

Unit is the elementary data unit routed across the server.

type VP8

type VP8 struct {
	Base
	Frame []byte
}

VP8 is a VP8 data unit.

type VP9

type VP9 struct {
	Base
	Frame []byte
}

VP9 is a VP9 data unit.

Jump to

Keyboard shortcuts

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