recorder

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQuicClient

func NewQuicClient(ctx context.Context, clientConfig ClientConfig, config *RecorderConfig) (quic.Connection, error)

Types

type Channel

type Channel int
const (
	LeftChannel  Channel = 1
	RightChannel Channel = 2
)

type ChannelConfig

type ChannelConfig map[string]int

type ClientConfig

type ClientConfig struct {
	ClientId   string
	BucketName string
	FileName   string
	Channel    int // 1 to left channel, 2 to right channel
}

type PacketType

type PacketType byte
const (
	ConfigPacket   PacketType = 0x01
	DataPacket     PacketType = 0x02
	RoomEndPacket  PacketType = 0x03
	TrackEndPacket PacketType = 0x04
)

type RecorderConfig added in v0.0.2

type RecorderConfig struct {
	Host     string
	Port     uint16
	CertFile string
	KeyFile  string
}

type SplitConfig

type SplitConfig struct {
	Start    time.Duration
	End      time.Duration
	FileName string
}

type StopConfig

type StopConfig struct {
	Splits        []SplitConfig
	ChannelConfig ChannelConfig
}

type Track

type Track struct {
	TrackID  string
	ClientID string
	RoomID   string
	// contains filtered or unexported fields
}

func (*Track) Close

func (q *Track) Close() error

func (*Track) Write

func (q *Track) Write(p []byte) (int, error)

func (*Track) WritePacket

func (q *Track) WritePacket(packet *rtp.Packet) (int, error)

type TrackConfig

type TrackConfig struct {
	TrackID  string
	ClientID string
	RoomID   string
	FileName string
	MimeType string
	Channel  int
}

type TrackRecorder

type TrackRecorder interface {
	Write(data []byte) (int, error)
	WritePacket(packet *rtp.Packet) (int, error)
	Close() error
}

func NewTrackRecorder

func NewTrackRecorder(conf *TrackConfig, stream quic.SendStream) (TrackRecorder, error)

Jump to

Keyboard shortcuts

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