libristwrapper

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupLoggingSettings

func CleanupLoggingSettings(logSettings *RistLoggingSettings)

CleanupLoggingSettings cleans up any configured cb's used in RistLoggingSettings

func DisableGlobalLoggingCB

func DisableGlobalLoggingCB() error

DisableGlobalLoggingCB disables global logging

func ReceiverDestroy

func ReceiverDestroy(ctx RistCtx) error

func ReceiverSetNotifyFD

func ReceiverSetNotifyFD(ctx RistCtx, write *os.File) error

func ReceiverStart

func ReceiverStart(ctx RistCtx) error

func SetGlobalLoggingCB

func SetGlobalLoggingCB(cb LogCallbackFunc) error

SetGlobalLoggingCB sets the LogCallbackFunc for the global libRIST logger

func SetStatsCallback

func SetStatsCallback(ctx RistCtx, statsInterval int, cbFunc StatsCallbackFunc) (unsafe.Pointer, error)

func StatsCallbackUnrefPtr

func StatsCallbackUnrefPtr(ptr unsafe.Pointer)

Types

type LogCallbackFunc

type LogCallbackFunc func(loglevel RistLogLevel, logmessage string)

LogCallbackFunc is an optionally set callback function/closure for logmessages

type Peer

type Peer interface {
	Destroy() error //Destroy Peer
}

Peer is a libRIST connection endpoint

func CreatePeer

func CreatePeer(ctx RistCtx, config PeerConfig) (Peer, error)

CreatePeer creates a new Peer

type PeerConfig

type PeerConfig struct {
	Address        string //Address is the address in the form: rist://@1.2.3.4:5678 where @ indicates listening
	Interface      string //Interface: optional interface which to use for multicast reception
	Psk            string //Psk: optional PSK secret
	PskKeySize     int    //PskKeySize: optional PSK keysize (128 or 256)
	CName          string //CName: optional cname to be transmitted on this connection
	RecoveryBuffer uint32 //RecoveryBuffer size in ms
}

PeerConfig configuration for a libRIST peer

type ReceiverFlowStats

type ReceiverFlowStats struct {
	PeerCount                 uint32
	CName                     string
	FlowID                    uint32
	Status                    int
	Bandwidth                 uint
	RetryBandwidth            uint
	SentPackets               uint64
	ReceivedPackets           uint64
	MissingPackets            uint32
	ReorderedPackets          uint32
	RecoveredPackets          uint32
	RecoveredFirstRetryReq    uint32
	LostPackets               uint32
	Quality                   float64
	MinimalInterPacketArrival uint64
	CurrentInterPacketArrival uint64
	MaximumInterPacketArrival uint64
	Rtt                       uint32
}

type RistCtx

type RistCtx *C.struct_rist_ctx

RistCtx libRIST instance context

func ReceiverCreate

func ReceiverCreate(profile RistProfile, loggingSettings *RistLoggingSettings) (RistCtx, error)

type RistData

type RistData struct {
	Data            []byte
	DestinationPort uint16
}

func ReceiverReadData

func ReceiverReadData(ctx RistCtx, timeout int) (*RistData, int, error)

type RistDataReadTimeout

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

func (*RistDataReadTimeout) Error

func (e *RistDataReadTimeout) Error() string

type RistLogLevel

type RistLogLevel int

RistLogLevel severity of log messages

const (
	LogLevelDisable RistLogLevel = RistLogLevel(logLevelDisable)
	LogLevelError   RistLogLevel = RistLogLevel(logLevelError)
	LogLevelWarn    RistLogLevel = RistLogLevel(logLevelWarn)
	LogLevelNotice  RistLogLevel = RistLogLevel(logLevelNotice)
	LogLevelInfo    RistLogLevel = RistLogLevel(logLevelInfo)
	LogLevelDebug   RistLogLevel = RistLogLevel(logLevelDebug)
)

Available log levels

type RistLoggingSettings

type RistLoggingSettings C.struct_rist_logging_settings

RistLoggingSettings rist logging configuration struct

func CreateRistLoggingSettingsWithCB

func CreateRistLoggingSettingsWithCB(cb LogCallbackFunc) *RistLoggingSettings

CreateRistLoggingSettingsWithCB creates RistLoggingSettings configured to use cb

type RistProfile

type RistProfile int
const (
	RistProfileSimple RistProfile = 0
	RistProfileMain   RistProfile = 1
)

type SenderPeerStats

type SenderPeerStats struct {
	CName                string
	PeerId               uint32
	Bandwidth            uint
	RetryBandwidth       uint
	SentPackets          uint64
	ReceivedPackets      uint64
	RetransmittedPackets uint64
	Quality              float64
	Rtt                  uint32
}

type StatsCallbackFunc

type StatsCallbackFunc func(*StatsContainer)

type StatsContainer

type StatsContainer struct {
	SenderStats       *SenderPeerStats   `json: "senderstats,omitempty"`
	ReceiverFlowStats *ReceiverFlowStats `json: "senderstats,omitempty"`
}

Jump to

Keyboard shortcuts

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