streamtracker

package
v0.0.0-...-c2cc3df Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

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,
	_ *buffer.ExtDependencyDescriptor,
)

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 StreamTrackerDependencyDescriptor

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

func NewStreamTrackerDependencyDescriptor

func NewStreamTrackerDependencyDescriptor(params StreamTrackerParams) *StreamTrackerDependencyDescriptor

func (*StreamTrackerDependencyDescriptor) BitrateTemporalCumulative

func (s *StreamTrackerDependencyDescriptor) BitrateTemporalCumulative(layer int32) []int64

func (*StreamTrackerDependencyDescriptor) LayeredTracker

func (*StreamTrackerDependencyDescriptor) Observe

func (s *StreamTrackerDependencyDescriptor) Observe(temporalLayer int32, pktSize int, payloadSize int, hasMarker bool, ts uint32, ddVal *buffer.ExtDependencyDescriptor)

func (*StreamTrackerDependencyDescriptor) OnBitrateAvailable

func (s *StreamTrackerDependencyDescriptor) OnBitrateAvailable(layer int32, f func())

func (*StreamTrackerDependencyDescriptor) OnStatusChanged

func (s *StreamTrackerDependencyDescriptor) OnStatusChanged(layer int32, f func(status StreamStatus))

func (*StreamTrackerDependencyDescriptor) Reset

func (*StreamTrackerDependencyDescriptor) SetPaused

func (s *StreamTrackerDependencyDescriptor) SetPaused(paused bool)

func (*StreamTrackerDependencyDescriptor) Start

func (*StreamTrackerDependencyDescriptor) Status

func (*StreamTrackerDependencyDescriptor) Stop

type StreamTrackerDependencyDescriptorLayered

type StreamTrackerDependencyDescriptorLayered struct {
	*StreamTrackerDependencyDescriptor
	// contains filtered or unexported fields
}

---------------------------- Layered wrapper for StreamTrackerWorker

func (*StreamTrackerDependencyDescriptorLayered) BitrateTemporalCumulative

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

func (*StreamTrackerDependencyDescriptorLayered) OnBitrateAvailable

func (s *StreamTrackerDependencyDescriptorLayered) OnBitrateAvailable(f func())

func (*StreamTrackerDependencyDescriptorLayered) OnStatusChanged

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

func (*StreamTrackerDependencyDescriptorLayered) Status

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
}

type StreamTrackerWorker

type StreamTrackerWorker interface {
	Start()
	Stop()
	Reset()
	OnStatusChanged(f func(status StreamStatus))
	OnBitrateAvailable(f func())
	Status() StreamStatus
	BitrateTemporalCumulative() []int64
	SetPaused(paused bool)
	Observe(temporalLayer int32, pktSize int, payloadSize int, hasMarker bool, ts uint32, dd *buffer.ExtDependencyDescriptor)
}

Jump to

Keyboard shortcuts

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