Documentation ¶
Overview ¶
Package stream contains the Stream object.
Index ¶
- type Stream
- func (s *Stream) AddReader(r interface{}, medi *media.Media, forma formats.Format, cb func(unit.Unit))
- func (s *Stream) Close()
- func (s *Stream) Medias() media.Medias
- func (s *Stream) RTSPStream() *gortsplib.ServerStream
- func (s *Stream) RemoveReader(r interface{})
- func (s *Stream) WriteRTPPacket(medi *media.Media, forma formats.Format, pkt *rtp.Packet, ntp time.Time)
- func (s *Stream) WriteUnit(medi *media.Media, forma formats.Format, data unit.Unit)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
Stream is a media stream. It stores tracks, readers and allow to write data to readers.
func New ¶
func New( udpMaxPayloadSize int, medias media.Medias, generateRTPPackets bool, bytesReceived *uint64, source logger.Writer, ) (*Stream, error)
New allocates a Stream.
func (*Stream) AddReader ¶
func (s *Stream) AddReader(r interface{}, medi *media.Media, forma formats.Format, cb func(unit.Unit))
AddReader adds a reader.
func (*Stream) RTSPStream ¶
func (s *Stream) RTSPStream() *gortsplib.ServerStream
RTSPStream returns the RTSP stream.
func (*Stream) RemoveReader ¶
func (s *Stream) RemoveReader(r interface{})
RemoveReader removes a reader.
Click to show internal directories.
Click to hide internal directories.