Versions in this module Expand all Collapse all v4 v4.15.3 Apr 23, 2024 v4.15.2 Apr 23, 2024 Changes in this version + const READSTATE_FIRST + const READSTATE_INIT + const READSTATE_NORMAL + const RTPMTU + const SUBMODE_BUFFER + const SUBMODE_NOJUMP + const SUBMODE_REAL + var ErrDiscard = errors.New("discard") + type AAC struct + Mode int + func NewAAC(puber IPuber, stuff ...any) (aac *AAC) + func (aac *AAC) CompleteRTP(value *AVFrame) + func (aac *AAC) WriteADTS(ts uint32, b util.IBytes) + func (aac *AAC) WriteAVCC(ts uint32, frame *util.BLL) error + func (aac *AAC) WriteRTPFrame(rtpItem *LIRTP) + func (aac *AAC) WriteSequenceHead(sh []byte) error + type AV1 struct + func NewAV1(puber IPuber, stuff ...any) (vt *AV1) + func (vt *AV1) CompleteAVCC(rv *AVFrame) + func (vt *AV1) CompleteRTP(value *AVFrame) + func (vt *AV1) WriteRTPFrame(rtpItem *LIRTP) + func (vt *AV1) WriteSequenceHead(head []byte) (err error) + type AVRingReader struct + AbsTime uint32 + ConfSeq int + Delay uint32 + FirstSeq uint32 + FirstTs time.Duration + SkipTs time.Duration + StartTs time.Duration + State byte + Track *Media + func NewAVRingReader(t *Media) *AVRingReader + func (r *AVRingReader) DecConfChanged() bool + func (r *AVRingReader) GetDTS32() uint32 + func (r *AVRingReader) GetPTS32() uint32 + func (r *AVRingReader) ReadFrame(mode int) (err error) + func (r *AVRingReader) ResetAbsTime() + type Audio struct + AVCCHead []byte + Channels byte + CodecID codec.AudioCodecID + IndexDeltaLength int + IndexLength int + SampleSize byte + SizeLength int + func (a *Audio) Attach() + func (a *Audio) CompleteAVCC(value *AVFrame) + func (a *Audio) CompleteRTP(value *AVFrame) + func (a *Audio) Detach() + func (a *Audio) GetCodec() codec.AudioCodecID + func (a *Audio) GetName() string + func (a *Audio) Narrow() + func (av *Audio) Flush() + func (av *Audio) WriteADTS(pts uint32, adts util.IBytes) + func (av *Audio) WriteAVCC(ts uint32, frame *util.BLL) + func (av *Audio) WriteRawBytes(pts uint32, raw util.IBytes) + func (av *Audio) WriteSequenceHead(sh []byte) error + type Base struct + BPS int + DropCount int + Drops int + FPS int + Name string + Publisher common.IPuber + RawPart []int + RawSize int + State common.TrackState + func (bt *Base[T, F]) ComputeBPS(bytes int) + func (bt *Base[T, F]) Dispose() + func (bt *Base[T, F]) GetBPS() int + func (bt *Base[T, F]) GetDrops() int + func (bt *Base[T, F]) GetFPS() int + func (bt *Base[T, F]) GetName() string + func (bt *Base[T, F]) GetPublisher() common.IPuber + func (bt *Base[T, F]) GetRBSize() int + func (bt *Base[T, F]) SetStuff(stuff ...any) + func (bt *Base[T, F]) SnapForJson() + type BytesData struct + Pool util.BytesPool + func NewBytesDataTrack(name string) (dt *BytesData) + type Channel struct + func (r *Channel[T]) AddListener(c chan T) + func (r *Channel[T]) CreateReader(l int) chan T + func (r *Channel[T]) Write(data T) + type Data struct + func NewDataTrack[T any](name string) (dt *Data[T]) + func (d *Data[T]) Attach(s IStream) + func (d *Data[T]) LastWriteTime() time.Time + func (d *Data[T]) Play(ctx context.Context, onData func(*DataFrame[T]) error) (err error) + func (dt *Data[T]) Init(n int) + func (dt *Data[T]) Push(data T) + type DataReader struct + type G711 struct + func NewG711(puber IPuber, alaw bool, stuff ...any) (g711 *G711) + func (g711 *G711) CompleteRTP(value *AVFrame) + func (g711 *G711) WriteAVCC(ts uint32, frame *util.BLL) error + func (g711 *G711) WriteRTPFrame(rtpItem *LIRTP) + type H264 struct + func NewH264(puber IPuber, stuff ...any) (vt *H264) + func (vt *H264) CompleteRTP(value *AVFrame) + func (vt *H264) GetNALU_SEI() (item util.LIBP) + func (vt *H264) WriteRTPFrame(rtpItem *LIRTP) + func (vt *H264) WriteSequenceHead(head []byte) (err error) + func (vt *H264) WriteSliceBytes(slice []byte) + type H265 struct + VPS []byte + func NewH265(puber IPuber, stuff ...any) (vt *H265) + func (vt *H265) CompleteAVCC(rv *AVFrame) + func (vt *H265) CompleteRTP(value *AVFrame) + func (vt *H265) GetNALU_SEI() (item util.LIBP) + func (vt *H265) WriteRTPFrame(rtpItem *LIRTP) + func (vt *H265) WriteSequenceHead(head []byte) (err error) + func (vt *H265) WriteSliceBytes(slice []byte) + type IDRingList struct + HistoryRing *util.Ring[*AVFrame] + IDRList util.List[*util.Ring[*AVFrame]] + IDRing *util.Ring[*AVFrame] + func (p *IDRingList) AddIDR(IDRing *util.Ring[*AVFrame]) + func (p *IDRingList) ShiftIDR() + type Media struct + BufferTime time.Duration + BytesPool util.BytesPool + PayloadType byte + RtpPool util.Pool[RTPFrame] + SSRC uint32 + SampleRate uint32 + SequenceHead []byte + SequenceHeadSeq int + func (av *Media) AddIDR() + func (av *Media) AppendAuBytes(b ...[]byte) + func (av *Media) CurrentFrame() *AVFrame + func (av *Media) Flush() + func (av *Media) GetFromPool(b util.IBytes) (item util.LIBP) + func (av *Media) GetRTPFromPool() (result *LIRTP) + func (av *Media) LastWriteTime() time.Time + func (av *Media) PacketizeRTP(payloads ...[][]byte) + func (av *Media) PreFrame() *AVFrame + func (av *Media) SetSpeedLimit(value time.Duration) + func (av *Media) SetStuff(stuff ...any) + func (av *Media) SnapForJson() + func (av *Media) WriteRTP(raw *LIRTP) + func (av *Media) WriteRTPPack(p *rtp.Packet) + func (av *Media) WriteSequenceHead(sh []byte) + type Opus struct + func NewOpus(puber IPuber, stuff ...any) (opus *Opus) + func (opus *Opus) CompleteRTP(value *AVFrame) + func (opus *Opus) WriteAVCC(ts uint32, frame *util.BLL) error + func (opus *Opus) WriteRTPFrame(rtpItem *LIRTP) + type RTPDemuxer struct + type RecycleData struct + func NewRecycleDataTrack[T util.Recyclable](name string) (dt *RecycleData[T]) + func (dt *RecycleData[T]) Push(data T) + type RingReader struct + Count int + func (r *RingReader[T, F]) Read(ring *util.Ring[F]) (err error) + func (r *RingReader[T, F]) ReadNext() (err error) + func (r *RingReader[T, F]) StartRead(ring *util.Ring[F]) (err error) + func (r *RingReader[T, F]) TryRead() (f F, err error) + type SpesificTrack interface + CompleteAVCC func(*AVFrame) + CompleteRTP func(*AVFrame) + Flush func() + GetNALU_SEI func() util.LIBP + WriteRTPFrame func(*LIRTP) + WriteSequenceHead func([]byte) error + WriteSliceBytes func([]byte) + type Video struct + CodecID codec.VideoCodecID + GOP int + PPS []byte + SPS []byte + func (v *Video) Attach() + func (v *Video) Detach() + func (vt *Video) CompleteAVCC(rv *AVFrame) + func (vt *Video) Flush() + func (vt *Video) GetCodec() codec.VideoCodecID + func (vt *Video) GetName() string + func (vt *Video) SetLostFlag() + func (vt *Video) WriteAVCC(ts uint32, frame *util.BLL) (err error) + func (vt *Video) WriteAnnexB(pts uint32, dts uint32, frame []byte) + func (vt *Video) WriteNalu(pts uint32, dts uint32, nalu []byte) + func (vt *Video) WriteSequenceHead(sh []byte) + func (vt *Video) WriteSliceByte(b ...byte)