unit

package
v0.0.0-...-0558441 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 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
	PTS time.Duration
	TU  [][]byte
}

AV1 is an AV1 data unit.

type Base

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

Base contains fields shared across all units.

func (*Base) GetNTP

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

GetNTP 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
	PTS time.Duration
	AU  [][]byte
}

H264 is a H264 data unit.

type H265

type H265 struct {
	Base
	PTS time.Duration
	AU  [][]byte
}

H265 is a H265 data unit.

type MPEG1Audio

type MPEG1Audio struct {
	Base
	PTS    time.Duration
	Frames [][]byte
}

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

type MPEG4AudioGeneric

type MPEG4AudioGeneric struct {
	Base
	PTS time.Duration
	AUs [][]byte
}

MPEG4AudioGeneric is a MPEG-4 Audio data unit.

type MPEG4AudioLATM

type MPEG4AudioLATM struct {
	Base
	PTS time.Duration
	AU  []byte
}

MPEG4AudioLATM is a MPEG-4 Audio data unit.

type Opus

type Opus struct {
	Base
	PTS     time.Duration
	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
}

Unit is the elementary data unit routed across the server.

type VP8

type VP8 struct {
	Base
	PTS   time.Duration
	Frame []byte
}

VP8 is a VP8 data unit.

type VP9

type VP9 struct {
	Base
	PTS   time.Duration
	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