samples

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeOpus = 1
	TypeVP8  = 2
	TypeVP9  = 3
	TypeH264 = 4
)

Types for samples

Variables

View Source
var (
	// ErrCodecNotSupported is returned when a rtp packed it pushed with an unsupported codec
	ErrCodecNotSupported = errors.New("codec not supported")
)

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder Module for building video/audio samples from rtp streams

func NewBuilder

func NewBuilder(track *webrtc.Track, maxLate uint16) *Builder

NewBuilder Initialize a new audio sample builder

func (*Builder) Read

func (b *Builder) Read() *Sample

Read sample

func (*Builder) Stop

func (b *Builder) Stop()

Stop stop all buffer

func (*Builder) Track

func (b *Builder) Track() *webrtc.Track

Track returns the builders underlying track

type Sample

type Sample struct {
	Type           int
	Timestamp      uint32
	SequenceNumber uint16
	Properties     map[string]interface{}
	Payload        []byte
}

Sample of audio or video

Jump to

Keyboard shortcuts

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