videolayerselector

package
v0.0.0-...-bdb9a8c Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

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

func NewBase

func NewBase(logger logger.Logger) *Base

func (*Base) CheckSync

func (b *Base) CheckSync() (locked bool, layer int32)

func (*Base) GetCurrent

func (b *Base) GetCurrent() buffer.VideoLayer

func (*Base) GetMax

func (b *Base) GetMax() buffer.VideoLayer

func (*Base) GetMaxSeen

func (b *Base) GetMaxSeen() buffer.VideoLayer

func (*Base) GetRequestSpatial

func (b *Base) GetRequestSpatial() int32

func (*Base) GetTarget

func (b *Base) GetTarget() buffer.VideoLayer

func (*Base) IsOvershootOkay

func (b *Base) IsOvershootOkay() bool

func (*Base) Rollback

func (b *Base) Rollback()

func (*Base) Select

func (b *Base) Select(_extPkt *buffer.ExtPacket, _layer int32) (result VideoLayerSelectorResult)

func (*Base) SelectTemporal

func (b *Base) SelectTemporal(extPkt *buffer.ExtPacket) int32

func (*Base) SetCurrent

func (b *Base) SetCurrent(currentLayer buffer.VideoLayer)

func (*Base) SetMax

func (b *Base) SetMax(maxLayer buffer.VideoLayer)

func (*Base) SetMaxSeen

func (b *Base) SetMaxSeen(maxSeenLayer buffer.VideoLayer)

func (*Base) SetMaxSeenSpatial

func (b *Base) SetMaxSeenSpatial(layer int32)

func (*Base) SetMaxSeenTemporal

func (b *Base) SetMaxSeenTemporal(layer int32)

func (*Base) SetMaxSpatial

func (b *Base) SetMaxSpatial(layer int32)

func (*Base) SetMaxTemporal

func (b *Base) SetMaxTemporal(layer int32)

func (*Base) SetRequestSpatial

func (b *Base) SetRequestSpatial(layer int32)

func (*Base) SetTarget

func (b *Base) SetTarget(targetLayer buffer.VideoLayer)

func (*Base) SetTemporalLayerSelector

func (b *Base) SetTemporalLayerSelector(tls temporallayerselector.TemporalLayerSelector)

type DecodeTarget

type DecodeTarget struct {
	buffer.DependencyDescriptorDecodeTarget
	// contains filtered or unexported fields
}

func (*DecodeTarget) Active

func (dt *DecodeTarget) Active() bool

func (*DecodeTarget) OnFrame

func (dt *DecodeTarget) OnFrame(extFrameNum uint64, fd *dd.FrameDependencyTemplate) (FrameDetectionResult, error)

func (*DecodeTarget) UpdateActive

func (dt *DecodeTarget) UpdateActive(activeBitmask uint32)

func (*DecodeTarget) Valid

func (dt *DecodeTarget) Valid() bool

type DependencyDescriptor

type DependencyDescriptor struct {
	*Base
	// contains filtered or unexported fields
}

func NewDependencyDescriptor

func NewDependencyDescriptor(logger logger.Logger) *DependencyDescriptor

func NewDependencyDescriptorFromNull

func NewDependencyDescriptorFromNull(vls VideoLayerSelector) *DependencyDescriptor

func (*DependencyDescriptor) CheckSync

func (d *DependencyDescriptor) CheckSync() (locked bool, layer int32)

func (*DependencyDescriptor) IsOvershootOkay

func (d *DependencyDescriptor) IsOvershootOkay() bool

func (*DependencyDescriptor) Rollback

func (d *DependencyDescriptor) Rollback()

func (*DependencyDescriptor) Select

func (d *DependencyDescriptor) Select(extPkt *buffer.ExtPacket, _layer int32) (result VideoLayerSelectorResult)

type FrameChain

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

func NewFrameChain

func NewFrameChain(decisions *SelectorDecisionCache, chainIdx int, logger logger.Logger) *FrameChain

func (*FrameChain) BeginUpdateActive

func (fc *FrameChain) BeginUpdateActive()

func (*FrameChain) Broken

func (fc *FrameChain) Broken() bool

func (*FrameChain) EndUpdateActive

func (fc *FrameChain) EndUpdateActive()

func (*FrameChain) OnExpectFrameChanged

func (fc *FrameChain) OnExpectFrameChanged(frameNum uint64, decision selectorDecision)

func (*FrameChain) OnFrame

func (fc *FrameChain) OnFrame(extFrameNum uint64, fd *dd.FrameDependencyTemplate) bool

func (*FrameChain) UpdateActive

func (fc *FrameChain) UpdateActive(active bool)

type FrameDetectionResult

type FrameDetectionResult struct {
	TargetValid bool
	DTI         dd.DecodeTargetIndication
}

type FrameNumberWrapper

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

func (*FrameNumberWrapper) UpdateAndGet

func (f *FrameNumberWrapper) UpdateAndGet(new uint64, updateOffset bool) uint64

UpdateAndGet returns the wrapped frame number from the given frame number, and updates the offset to make sure the returned frame number is always inorder. Should only updateOffset if the new frame is a keyframe because frame dependencies uses on the frame number diff so frames inside a GOP should have the same offset.

type Null

type Null struct {
	*Base
}

func NewNull

func NewNull(logger logger.Logger) *Null

type SelectorDecisionCache

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

func NewSelectorDecisionCache

func NewSelectorDecisionCache(maxNumElements uint64, numNackEntries uint64) *SelectorDecisionCache

func (*SelectorDecisionCache) AddDropped

func (s *SelectorDecisionCache) AddDropped(entity uint64)

func (*SelectorDecisionCache) AddForwarded

func (s *SelectorDecisionCache) AddForwarded(entity uint64)

func (*SelectorDecisionCache) ExpectDecision

func (s *SelectorDecisionCache) ExpectDecision(entity uint64, f func(entity uint64, decision selectorDecision)) bool

func (*SelectorDecisionCache) GetDecision

func (s *SelectorDecisionCache) GetDecision(entity uint64) (selectorDecision, error)

type Simulcast

type Simulcast struct {
	*Base
}

func NewSimulcast

func NewSimulcast(logger logger.Logger) *Simulcast

func NewSimulcastFromNull

func NewSimulcastFromNull(vls VideoLayerSelector) *Simulcast

func (*Simulcast) IsOvershootOkay

func (s *Simulcast) IsOvershootOkay() bool

func (*Simulcast) Select

func (s *Simulcast) Select(extPkt *buffer.ExtPacket, layer int32) (result VideoLayerSelectorResult)

type VP9

type VP9 struct {
	*Base
}

func NewVP9

func NewVP9(logger logger.Logger) *VP9

func NewVP9FromNull

func NewVP9FromNull(vls VideoLayerSelector) *VP9

func (*VP9) IsOvershootOkay

func (v *VP9) IsOvershootOkay() bool

func (*VP9) Select

func (v *VP9) Select(extPkt *buffer.ExtPacket, _layer int32) (result VideoLayerSelectorResult)

type VideoLayerSelector

type VideoLayerSelector interface {
	IsOvershootOkay() bool

	SetTemporalLayerSelector(tls temporallayerselector.TemporalLayerSelector)

	SetMax(maxLayer buffer.VideoLayer)
	SetMaxSpatial(layer int32)
	SetMaxTemporal(layer int32)
	GetMax() buffer.VideoLayer

	SetTarget(targetLayer buffer.VideoLayer)
	GetTarget() buffer.VideoLayer

	SetRequestSpatial(layer int32)
	GetRequestSpatial() int32

	CheckSync() (locked bool, layer int32)

	SetMaxSeen(maxSeenLayer buffer.VideoLayer)
	SetMaxSeenSpatial(layer int32)
	SetMaxSeenTemporal(layer int32)
	GetMaxSeen() buffer.VideoLayer

	SetCurrent(currentLayer buffer.VideoLayer)
	GetCurrent() buffer.VideoLayer

	Select(extPkt *buffer.ExtPacket, layer int32) VideoLayerSelectorResult
	SelectTemporal(extPkt *buffer.ExtPacket) int32
	Rollback()
}

type VideoLayerSelectorResult

type VideoLayerSelectorResult struct {
	IsSelected                    bool
	IsRelevant                    bool
	IsSwitching                   bool
	IsResuming                    bool
	RTPMarker                     bool
	DependencyDescriptorExtension []byte
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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