stats

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateCurrentNodeStats

func UpdateCurrentNodeStats(nodeStats *livekit.NodeStats) error

Types

type PacketStats

type PacketStats struct {
	PacketBytes uint64 `json:"packetBytes"`
	PacketTotal uint64 `json:"packetTotal"`
	NackTotal   uint64 `json:"nackTotal"`
	PLITotal    uint64 `json:"pliTotal"`
	FIRTotal    uint64 `json:"firTotal"`
	// contains filtered or unexported fields
}

func (PacketStats) Copy

func (s PacketStats) Copy() *PacketStats

func (*PacketStats) HandleRTCP

func (s *PacketStats) HandleRTCP(pkts []rtcp.Packet)

func (*PacketStats) IncrementBytes

func (s *PacketStats) IncrementBytes(bytes uint64)

func (*PacketStats) IncrementFIR

func (s *PacketStats) IncrementFIR(count uint64)

func (*PacketStats) IncrementNack

func (s *PacketStats) IncrementNack(count uint64)

func (*PacketStats) IncrementPLI

func (s *PacketStats) IncrementPLI(count uint64)

func (*PacketStats) IncrementPackets

func (s *PacketStats) IncrementPackets(count uint64)

type RoomStatsReporter

type RoomStatsReporter struct {
	Incoming *PacketStats
	Outgoing *PacketStats
	// contains filtered or unexported fields
}

RoomStatsReporter is created for each room

func NewRoomStatsReporter

func NewRoomStatsReporter(roomName string) *RoomStatsReporter

func (*RoomStatsReporter) AddParticipant

func (r *RoomStatsReporter) AddParticipant()

func (*RoomStatsReporter) AddPublishedTrack

func (r *RoomStatsReporter) AddPublishedTrack(kind string)

func (*RoomStatsReporter) AddSubscribedTrack

func (r *RoomStatsReporter) AddSubscribedTrack(kind string)

func (*RoomStatsReporter) RoomEnded

func (r *RoomStatsReporter) RoomEnded()

func (*RoomStatsReporter) RoomStarted

func (r *RoomStatsReporter) RoomStarted()

func (*RoomStatsReporter) SubParticipant

func (r *RoomStatsReporter) SubParticipant()

func (*RoomStatsReporter) SubPublishedTrack

func (r *RoomStatsReporter) SubPublishedTrack(kind string)

func (*RoomStatsReporter) SubSubscribedTrack

func (r *RoomStatsReporter) SubSubscribedTrack(kind string)

type StatsBufferWrapper

type StatsBufferWrapper struct {
	CreateBufferFunc func(packetType packetio.BufferPacketType, ssrc uint32) io.ReadWriteCloser
	Stats            *PacketStats
}

StatsBufferWrapper wraps a buffer factory so we could get information on incoming packets

func (*StatsBufferWrapper) CreateBuffer

func (w *StatsBufferWrapper) CreateBuffer(packetType packetio.BufferPacketType, ssrc uint32) io.ReadWriteCloser

type StatsInterceptor

type StatsInterceptor struct {
	interceptor.NoOp
	// contains filtered or unexported fields
}

StatsInterceptor is created for each participant to keep of track of outgoing stats it adheres to Pion interceptor interface

func NewStatsInterceptor

func NewStatsInterceptor(reporter *RoomStatsReporter) *StatsInterceptor

func (*StatsInterceptor) BindLocalStream

BindLocalStream lets you modify any outgoing RTP packets. It is called once for per LocalStream. The returned method will be called once per rtp packet.

func (*StatsInterceptor) BindRTCPWriter

func (s *StatsInterceptor) BindRTCPWriter(writer interceptor.RTCPWriter) interceptor.RTCPWriter

BindRTCPWriter lets you modify any outgoing RTCP packets. It is called once per PeerConnection. The returned method will be called once per packet batch.

Jump to

Keyboard shortcuts

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