streamtracker

package
v1.4.3-dev5 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: Apache-2.0 Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StreamStatus

type StreamStatus int32
const (
	StreamStatusStopped StreamStatus = iota
	StreamStatusActive
)

func (StreamStatus) String

func (s StreamStatus) String() string

type StreamStatusChange

type StreamStatusChange int32
const (
	StreamStatusChangeNone StreamStatusChange = iota
	StreamStatusChangeStopped
	StreamStatusChangeActive
)

func (StreamStatusChange) String

func (s StreamStatusChange) String() string

type StreamTracker

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

func NewStreamTracker

func NewStreamTracker(params StreamTrackerParams) *StreamTracker

func (*StreamTracker) BitrateTemporalCumulative

func (s *StreamTracker) BitrateTemporalCumulative() []int64

BitrateTemporalCumulative returns the current stream bitrate temporal layer accumulated with lower temporal layers.

func (*StreamTracker) Observe

func (s *StreamTracker) Observe(
	temporalLayer int32,
	pktSize int,
	payloadSize int,
	hasMarker bool,
	ts uint32,
)

func (*StreamTracker) OnBitrateAvailable

func (s *StreamTracker) OnBitrateAvailable(f func())

func (*StreamTracker) OnStatusChanged

func (s *StreamTracker) OnStatusChanged(f func(status StreamStatus))

func (*StreamTracker) Reset

func (s *StreamTracker) Reset()

func (*StreamTracker) SetPaused

func (s *StreamTracker) SetPaused(paused bool)

func (*StreamTracker) Start

func (s *StreamTracker) Start()

func (*StreamTracker) Status

func (s *StreamTracker) Status() StreamStatus

func (*StreamTracker) Stop

func (s *StreamTracker) Stop()

type StreamTrackerFrame

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

func (*StreamTrackerFrame) CheckStatus

func (s *StreamTrackerFrame) CheckStatus() StreamStatusChange

func (*StreamTrackerFrame) GetCheckInterval

func (s *StreamTrackerFrame) GetCheckInterval() time.Duration

func (*StreamTrackerFrame) Observe

func (s *StreamTrackerFrame) Observe(hasMarker bool, ts uint32) StreamStatusChange

func (*StreamTrackerFrame) Reset

func (s *StreamTrackerFrame) Reset()

func (*StreamTrackerFrame) Start

func (s *StreamTrackerFrame) Start()

func (*StreamTrackerFrame) Stop

func (s *StreamTrackerFrame) Stop()

type StreamTrackerFrameParams

type StreamTrackerFrameParams struct {
	Config    config.StreamTrackerFrameConfig
	ClockRate uint32
	Logger    logger.Logger
}

type StreamTrackerImpl

type StreamTrackerImpl interface {
	Start()
	Stop()
	Reset()

	GetCheckInterval() time.Duration

	Observe(hasMarker bool, ts uint32) StreamStatusChange
	CheckStatus() StreamStatusChange
}

func NewStreamTrackerFrame

func NewStreamTrackerFrame(params StreamTrackerFrameParams) StreamTrackerImpl

func NewStreamTrackerPacket

func NewStreamTrackerPacket(params StreamTrackerPacketParams) StreamTrackerImpl

type StreamTrackerPacket

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

func (*StreamTrackerPacket) CheckStatus

func (s *StreamTrackerPacket) CheckStatus() StreamStatusChange

func (*StreamTrackerPacket) GetCheckInterval

func (s *StreamTrackerPacket) GetCheckInterval() time.Duration

func (*StreamTrackerPacket) Observe

func (s *StreamTrackerPacket) Observe(_hasMarker bool, _ts uint32) StreamStatusChange

func (*StreamTrackerPacket) Reset

func (s *StreamTrackerPacket) Reset()

func (*StreamTrackerPacket) Start

func (s *StreamTrackerPacket) Start()

func (*StreamTrackerPacket) Stop

func (s *StreamTrackerPacket) Stop()

type StreamTrackerPacketParams

type StreamTrackerPacketParams struct {
	Config config.StreamTrackerPacketConfig
	Logger logger.Logger
}

type StreamTrackerParams

type StreamTrackerParams struct {
	StreamTrackerImpl     StreamTrackerImpl
	BitrateReportInterval time.Duration

	Logger logger.Logger
}

Jump to

Keyboard shortcuts

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