diagox

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultDiagoWebrtc = NewDiagoWebrtc()
View Source
var (
	RecordingFlushSize = 1024 * 4000
)

Functions

Types

type AnswerWebrtcOptions

type AnswerWebrtcOptions struct {
	Formats sdp.Formats
}

type DiagoWebrtc

type DiagoWebrtc struct {
	*webrtc.API
}

func NewDiagoWebrtc

func NewDiagoWebrtc() DiagoWebrtc

func (*DiagoWebrtc) AnswerWebrtc

func (api *DiagoWebrtc) AnswerWebrtc(d *diago.DialogServerSession, opts AnswerWebrtcOptions) error

type RTPNilReader

type RTPNilReader struct {
	media.RTPReader
}

func (*RTPNilReader) ReadRTP

func (r *RTPNilReader) ReadRTP(buf []byte, p *rtp.Packet) error

type Recording

type Recording struct {
	// Is id of recording
	ID string

	// Writer is our store
	// It will be closed toggether when recording is closed. Should be rare case
	// to keep writer open after recording
	// In some cases this is needed where for example WavWriter will update headers on close
	Writer io.WriteSeeker

	BitDepth int
	// contains filtered or unexported fields
}

func NewRecordingWav

func NewRecordingWav(id string, w io.WriteSeeker) *Recording

NewRecordingWav constructs recording for storing WAV

func (*Recording) Attach

func (r *Recording) Attach(m *diago.DialogMedia) error

Attach attaches to media of session This in other words chains new media reader,writers and monitors session NOTE: Listen must be called after in order recording stores this stream

func (*Recording) Close

func (r *Recording) Close() error

func (*Recording) Pause

func (r *Recording) Pause(toggle bool)

func (*Recording) Read

func (r *Recording) Read(b []byte) (int, error)

func (*Recording) Write

func (r *Recording) Write(b []byte) (int, error)

type RecordingStreamReader

type RecordingStreamReader struct {
	// MonitorReader is monitoring reader strea
	MonitorReader io.Reader

	// We expect this to be a file
	Writer io.Writer
	// contains filtered or unexported fields
}

func (*RecordingStreamReader) Read

func (r *RecordingStreamReader) Read(b []byte) (int, error)

type WebrtcTrackRTPReader

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

func (*WebrtcTrackRTPReader) ReadRTCP

func (r *WebrtcTrackRTPReader) ReadRTCP(buf []byte, rtcpBuf []rtcp.Packet) (int, error)

func (*WebrtcTrackRTPReader) ReadRTCPRaw

func (r *WebrtcTrackRTPReader) ReadRTCPRaw(buf []byte) (int, error)

func (*WebrtcTrackRTPReader) ReadRTP

func (r *WebrtcTrackRTPReader) ReadRTP(buf []byte, p *rtp.Packet) error

func (*WebrtcTrackRTPReader) ReadRTPRaw

func (r *WebrtcTrackRTPReader) ReadRTPRaw(buf []byte) (int, error)

type WebrtcTrackRTPWriter

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

func (*WebrtcTrackRTPWriter) WriteRTCP

func (r *WebrtcTrackRTPWriter) WriteRTCP(p rtcp.Packet) error

func (*WebrtcTrackRTPWriter) WriteRTCPRaw

func (r *WebrtcTrackRTPWriter) WriteRTCPRaw(buf []byte) (int, error)

func (*WebrtcTrackRTPWriter) WriteRTP

func (r *WebrtcTrackRTPWriter) WriteRTP(p *rtp.Packet) error

func (*WebrtcTrackRTPWriter) WriteRTPRaw

func (r *WebrtcTrackRTPWriter) WriteRTPRaw(buf []byte) (int, error)

Jump to

Keyboard shortcuts

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