Documentation ¶
Index ¶
- func SplitAnnexB[T ~[]byte](frame T, process func(T), delimiter []byte)
- type AVFrame
- type AVTrack
- type AudioTrack
- type DataFrame
- func (df *DataFrame[T]) GetSequence() uint32
- func (df *DataFrame[T]) IsDiscarded() bool
- func (df *DataFrame[T]) ReaderEnter()
- func (df *DataFrame[T]) ReaderLeave()
- func (df *DataFrame[T]) ReaderTryEnter() bool
- func (df *DataFrame[T]) Ready()
- func (df *DataFrame[T]) Reset()
- func (df *DataFrame[T]) SetSequence(sequence uint32)
- func (df *DataFrame[T]) StartWrite() (ok bool)
- type IIO
- type IPuber
- type IStream
- type LIRTP
- type ParamaterSets
- type RTPFrame
- type TimelineData
- type Track
- type TrackState
- type VideoTrack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SplitAnnexB ¶ added in v4.11.5
Types ¶
type AVFrame ¶
type AVFrame struct { DataFrame[any] IFrame bool PTS time.Duration DTS time.Duration Timestamp time.Duration // 绝对时间戳 ADTS util.LIBP `json:"-" yaml:"-"` // ADTS头 AVCC util.BLL `json:"-" yaml:"-"` // 打包好的AVCC格式(MPEG-4格式、Byte-Stream Format) RTP util.List[RTPFrame] `json:"-" yaml:"-"` AUList util.BLLs `json:"-" yaml:"-"` // 裸数据 }
func NewAVFrame ¶ added in v4.13.5
func NewAVFrame() *AVFrame
type AVTrack ¶
type AVTrack interface { Track PreFrame() *AVFrame CurrentFrame() *AVFrame Attach() Detach() WriteAVCC(ts uint32, frame *util.BLL) error //写入AVCC格式的数据 WriteRTP(*LIRTP) WriteRTPPack(*rtp.Packet) WriteSequenceHead(sh []byte) error Flush() SetSpeedLimit(time.Duration) GetRTPFromPool() *LIRTP GetFromPool(util.IBytes) util.LIBP }
type AudioTrack ¶
type DataFrame ¶
type DataFrame[T any] struct { DeltaTime uint32 // 相对上一帧时间戳,毫秒 WriteTime time.Time // 写入时间,可用于比较两个帧的先后 Sequence uint32 // 在一个Track中的序号 BytesIn int // 输入字节数用于计算BPS Data T `json:"-" yaml:"-"` // contains filtered or unexported fields }
func NewDataFrame ¶ added in v4.13.5
func (*DataFrame[T]) GetSequence ¶ added in v4.13.5
func (*DataFrame[T]) IsDiscarded ¶ added in v4.13.5
func (*DataFrame[T]) ReaderEnter ¶ added in v4.13.5
func (df *DataFrame[T]) ReaderEnter()
func (*DataFrame[T]) ReaderLeave ¶ added in v4.13.5
func (df *DataFrame[T]) ReaderLeave()
func (*DataFrame[T]) ReaderTryEnter ¶ added in v4.15.2
func (*DataFrame[T]) SetSequence ¶ added in v4.13.5
func (*DataFrame[T]) StartWrite ¶ added in v4.13.5
type IPuber ¶ added in v4.15.0
type IPuber interface { IIO GetAudioTrack() AudioTrack GetVideoTrack() VideoTrack GetConfig() *config.Publish Publish(streamPath string, pub IPuber) error }
type ParamaterSets ¶ added in v4.11.0
type ParamaterSets [][]byte
func (ParamaterSets) GetAnnexB ¶ added in v4.11.0
func (v ParamaterSets) GetAnnexB() (r net.Buffers)
func (ParamaterSets) WriteAnnexBTo ¶ added in v4.11.0
func (v ParamaterSets) WriteAnnexBTo(w io.Writer) (n int, err error)
type RTPFrame ¶
func (*RTPFrame) H264Type ¶
func (r *RTPFrame) H264Type() (naluType codec.H264NALUType)
func (*RTPFrame) H265Type ¶
func (r *RTPFrame) H265Type() (naluType codec.H265NALUType)
type TimelineData ¶ added in v4.5.6
type TrackState ¶ added in v4.11.2
type TrackState byte
const ( TrackStateOnline TrackState = iota // 上线 TrackStateOffline // 下线 )
Click to show internal directories.
Click to hide internal directories.