recorder

package
v0.0.0-...-3f73818 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 License: Apache-2.0 Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMediaNotSupported = errors.New("media not supported")

Functions

This section is empty.

Types

type MediaExtension

type MediaExtension string
const (
	MediaOGG  MediaExtension = "ogg"
	MediaIVF  MediaExtension = "ivf"
	MediaH264 MediaExtension = "h264"
)

func GetMediaExtension

func GetMediaExtension(mimeType string) MediaExtension

type Recorder

type Recorder interface {
	Start(context.Context, *webrtc.TrackRemote)
	Stop()
	Sink() Sink
}

func New

func New(codec webrtc.RTPCodecParameters, filename string, opts ...samplebuilder.Option) (Recorder, error)

func NewWith

func NewWith(codec webrtc.RTPCodecParameters, sink Sink, opts ...samplebuilder.Option) (Recorder, error)

type Sink

type Sink interface {
	Name() string
	Read([]byte) (int, error)
	Write([]byte) (int, error)
	Close() error
}

func NewBufferSink

func NewBufferSink(id string) Sink

func NewFileSink

func NewFileSink(filename string) (Sink, error)

Jump to

Keyboard shortcuts

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