Documentation ¶
Overview ¶
Packege pubsub implements publisher-subscribers model used in multi-channel streaming.
Index ¶
- type Queue
- func (self *Queue) Close() (err error)
- func (self *Queue) DelayedGopCount(n int) *QueueCursor
- func (self *Queue) DelayedTime(dur time.Duration) *QueueCursor
- func (self *Queue) Latest() *QueueCursor
- func (self *Queue) Oldest() *QueueCursor
- func (self *Queue) SetMaxGopCount(n int)
- func (self *Queue) WriteHeader(streams []av.CodecData) error
- func (self *Queue) WritePacket(pkt av.Packet) (err error)
- func (self *Queue) WriteTrailer() error
- type QueueCursor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
One publisher and multiple subscribers thread-safe packet buffer queue.
func (*Queue) DelayedGopCount ¶
func (self *Queue) DelayedGopCount(n int) *QueueCursor
Create cursor position at specific delayed GOP count in buffered packets.
func (*Queue) DelayedTime ¶
func (self *Queue) DelayedTime(dur time.Duration) *QueueCursor
Create cursor position at specific time in buffered packets.
func (*Queue) Latest ¶
func (self *Queue) Latest() *QueueCursor
Create cursor position at latest packet.
func (*Queue) Oldest ¶
func (self *Queue) Oldest() *QueueCursor
Create cursor position at oldest buffered packet.
func (*Queue) SetMaxGopCount ¶
func (*Queue) WritePacket ¶
Put packet into buffer, old packets will be discared.
func (*Queue) WriteTrailer ¶
type QueueCursor ¶
type QueueCursor struct {
// contains filtered or unexported fields
}
func (*QueueCursor) ReadPacket ¶
func (self *QueueCursor) ReadPacket() (pkt av.Packet, err error)
ReadPacket will not consume packets in Queue, it's just a cursor.
Click to show internal directories.
Click to hide internal directories.