media

package
v2.2.27-0...-5dabb11 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package media provides media writer and filters

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NSamples

func NSamples(d time.Duration, freq int) uint32

NSamples calculates the number of samples in media of length d with sampling frequency f. For example, NSamples(20 * time.Millisecond, 48000) will return the number of samples in a 20 millisecond segment of Opus audio recorded at 48000 samples per second.

Types

type Sample

type Sample struct {
	Data    []byte
	Samples uint32
}

A Sample contains encoded media and the number of samples in that media (see NSamples).

type Writer

type Writer interface {
	// Add the content of an RTP packet to the media
	WriteRTP(packet *rtp.Packet) error
	// Close the media
	// Note: Close implementation must be idempotent
	Close() error
}

Writer defines an interface to handle the creation of media files

Directories

Path Synopsis
Package h264writer implements H264 media container writer
Package h264writer implements H264 media container writer
Package ivfreader implements IVF media container reader
Package ivfreader implements IVF media container reader
Package ivfwriter implements IVF media container writer
Package ivfwriter implements IVF media container writer
Package oggreader implements the Ogg media container reader
Package oggreader implements the Ogg media container reader
Package oggwriter implements OGG media container writer
Package oggwriter implements OGG media container writer
Package rtpdump implements the RTPDump file format documented at https://www.cs.columbia.edu/irt/software/rtptools/
Package rtpdump implements the RTPDump file format documented at https://www.cs.columbia.edu/irt/software/rtptools/
Package samplebuilder provides functionality to reconstruct media frames from RTP packets.
Package samplebuilder provides functionality to reconstruct media frames from RTP packets.

Jump to

Keyboard shortcuts

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