unit

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 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 AC3 added in v1.1.1

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

AC3 is a AC-3 data unit.

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 G711 added in v1.4.2

type G711 struct {
	Base
	Samples []byte
}

G711 is a G711 data 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 LPCM added in v1.2.0

type LPCM struct {
	Base
	Samples []byte
}

LPCM is a LPCM data unit.

type MJPEG added in v1.1.1

type MJPEG struct {
	Base
	Frame []byte
}

MJPEG is a M-JPEG data unit.

type MPEG1Audio

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

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

type MPEG1Video added in v1.1.0

type MPEG1Video struct {
	Base
	Frame []byte
}

MPEG1Video is a MPEG-1/2 Video data unit.

type MPEG4Audio added in v1.1.1

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

MPEG4Audio is a MPEG-4 Audio data unit.

type MPEG4Video added in v1.1.0

type MPEG4Video struct {
	Base
	Frame []byte
}

MPEG4Video is a MPEG-4 Video 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