Documentation
¶
Index ¶
- Constants
- Variables
- type CodecMunger
- type DDTemporal
- func (v *DDTemporal) GetState() any
- func (v *DDTemporal) SeedState(_state any)
- func (v *DDTemporal) SetLast(_extPkt *buffer.ExtPacket)
- func (v *DDTemporal) UpdateAndGet(extPkt *buffer.ExtPacket, snOutOfOrder bool, _snHasGap bool, ...) (int, [MaxHeaderSize]byte, int, error)
- func (v *DDTemporal) UpdateAndGetPadding(_newPicture bool) ([]byte, error)
- func (v *DDTemporal) UpdateOffsets(_extPkt *buffer.ExtPacket)
- type Null
- func (n *Null) GetSeededState() any
- func (n *Null) GetState() any
- func (n *Null) SeedState(state any)
- func (n *Null) SetLast(_extPkt *buffer.ExtPacket)
- func (n *Null) UpdateAndGet(_extPkt *buffer.ExtPacket, snOutOfOrder bool, snHasGap bool, maxTemporal int32) (int, [MaxHeaderSize]byte, int, error)
- func (n *Null) UpdateAndGetPadding(newPicture bool) ([]byte, error)
- func (n *Null) UpdateOffsets(_extPkt *buffer.ExtPacket)
- type VP8
- func (v *VP8) GetState() any
- func (v *VP8) PictureIdOffset(extPictureId int32) (int32, bool)
- func (v *VP8) SeedState(seed any)
- func (v *VP8) SetLast(extPkt *buffer.ExtPacket)
- func (v *VP8) UpdateAndGet(extPkt *buffer.ExtPacket, snOutOfOrder bool, snHasGap bool, ...) (int, [MaxHeaderSize]byte, int, error)
- func (v *VP8) UpdateAndGetPadding(newPicture bool) ([]byte, error)
- func (v *VP8) UpdateOffsets(extPkt *buffer.ExtPacket)
- type VP8PictureIdWrapHandler
Constants ¶
View Source
const MaxHeaderSize = 8
MaxHeaderSize is the largest codec header the mungers produce (VP8: 6 bytes).
Variables ¶
Functions ¶
This section is empty.
Types ¶
type CodecMunger ¶
type CodecMunger interface {
GetState() any
SeedState(state any)
SetLast(extPkt *buffer.ExtPacket)
UpdateOffsets(extPkt *buffer.ExtPacket)
// UpdateAndGet returns the incoming codec header size and the munged
// header by value, so the per-packet path does not allocate.
UpdateAndGet(extPkt *buffer.ExtPacket, snOutOfOrder bool, snHasGap bool, maxTemporal int32) (int, [MaxHeaderSize]byte, int, error)
UpdateAndGetPadding(newPicture bool) ([]byte, error)
}
type DDTemporal ¶ added in v1.13.10
type DDTemporal struct {
// contains filtered or unexported fields
}
DDTemporal filters the temporal layers of a simulcast stream with the dependency descriptor, for any codec: it leaves the payload unchanged. Every packet names its frame and temporal layer, so the munger decides once per frame and applies that decision to all packets of the frame, a late one included. For VP8, libwebrtc sends a one byte payload descriptor with the dependency descriptor, so there is no picture ID to munge; the forwarder uses the VP8 munger for a stream that keeps picture IDs.
func NewDDTemporal ¶ added in v1.13.10
func NewDDTemporal(mimeType mime.MimeType, logger logger.Logger) *DDTemporal
func (*DDTemporal) GetState ¶ added in v1.13.10
func (v *DDTemporal) GetState() any
func (*DDTemporal) SeedState ¶ added in v1.13.10
func (v *DDTemporal) SeedState(_state any)
func (*DDTemporal) SetLast ¶ added in v1.13.10
func (v *DDTemporal) SetLast(_extPkt *buffer.ExtPacket)
func (*DDTemporal) UpdateAndGet ¶ added in v1.13.10
func (*DDTemporal) UpdateAndGetPadding ¶ added in v1.13.10
func (v *DDTemporal) UpdateAndGetPadding(_newPicture bool) ([]byte, error)
func (*DDTemporal) UpdateOffsets ¶ added in v1.13.10
func (v *DDTemporal) UpdateOffsets(_extPkt *buffer.ExtPacket)
type Null ¶
type Null struct {
// contains filtered or unexported fields
}
func (*Null) GetSeededState ¶
func (*Null) UpdateAndGet ¶
func (*Null) UpdateAndGetPadding ¶
func (*Null) UpdateOffsets ¶
type VP8 ¶
type VP8 struct {
// contains filtered or unexported fields
}
func NewVP8FromOther ¶ added in v1.9.11
func NewVP8FromOther(cm CodecMunger, logger logger.Logger) *VP8
func (*VP8) PictureIdOffset ¶
for testing only
func (*VP8) UpdateAndGet ¶
func (*VP8) UpdateAndGetPadding ¶
func (*VP8) UpdateOffsets ¶
type VP8PictureIdWrapHandler ¶
type VP8PictureIdWrapHandler struct {
// contains filtered or unexported fields
}
func (*VP8PictureIdWrapHandler) Init ¶
func (v *VP8PictureIdWrapHandler) Init(extPictureId int32, mBit bool)
func (*VP8PictureIdWrapHandler) MaxPictureId ¶
func (v *VP8PictureIdWrapHandler) MaxPictureId() int32
func (*VP8PictureIdWrapHandler) Unwrap ¶
func (v *VP8PictureIdWrapHandler) Unwrap(pictureId uint16, mBit bool) int32
unwrap picture id and update the maxPictureId. return unwrapped value
func (*VP8PictureIdWrapHandler) UpdateMaxPictureId ¶
func (v *VP8PictureIdWrapHandler) UpdateMaxPictureId(extPictureId int32, mBit bool)
Click to show internal directories.
Click to hide internal directories.