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: 0

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