Documentation ¶
Overview ¶
Package stream contains the Stream object.
Index ¶
- type ReadFunc
- type Reader
- type Stream
- func (s *Stream) AddReader(reader Reader, medi *description.Media, forma format.Format, cb ReadFunc)
- func (s *Stream) BytesReceived() uint64
- func (s *Stream) BytesSent() uint64
- func (s *Stream) Close()
- func (s *Stream) Desc() *description.Session
- func (s *Stream) RTSPSStream(server *gortsplib.Server) *gortsplib.ServerStream
- func (s *Stream) RTSPStream(server *gortsplib.Server) *gortsplib.ServerStream
- func (s *Stream) ReaderError(reader Reader) chan error
- func (s *Stream) ReaderFormats(reader Reader) []format.Format
- func (s *Stream) RemoveReader(reader Reader)
- func (s *Stream) StartReader(reader Reader)
- func (s *Stream) WaitRunningReader()
- func (s *Stream) WriteRTPPacket(medi *description.Media, forma format.Format, pkt *rtp.Packet, ntp time.Time, ...)
- func (s *Stream) WriteUnit(medi *description.Media, forma format.Format, u 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 allows to write data to readers.
func New ¶
func New( writeQueueSize int, udpMaxPayloadSize int, desc *description.Session, generateRTPPackets bool, decodeErrLogger logger.Writer, ) (*Stream, error)
New allocates a Stream.
func (*Stream) AddReader ¶
func (s *Stream) AddReader(reader Reader, medi *description.Media, forma format.Format, cb ReadFunc)
AddReader adds a reader. Used by all protocols except RTSP.
func (*Stream) BytesReceived ¶ added in v1.1.0
BytesReceived returns received bytes.
func (*Stream) Desc ¶ added in v1.0.1
func (s *Stream) Desc() *description.Session
Desc returns the description of the stream.
func (*Stream) RTSPSStream ¶ added in v1.0.1
func (s *Stream) RTSPSStream(server *gortsplib.Server) *gortsplib.ServerStream
RTSPSStream returns the RTSPS stream.
func (*Stream) RTSPStream ¶
func (s *Stream) RTSPStream(server *gortsplib.Server) *gortsplib.ServerStream
RTSPStream returns the RTSP stream.
func (*Stream) ReaderError ¶ added in v1.9.2
ReaderError returns whenever there's an error.
func (*Stream) ReaderFormats ¶ added in v1.9.2
ReaderFormats returns all formats that a reader is reading.
func (*Stream) RemoveReader ¶
RemoveReader removes a reader. Used by all protocols except RTSP.
func (*Stream) StartReader ¶ added in v1.9.2
StartReader starts a reader. Used by all protocols except RTSP.
func (*Stream) WaitRunningReader ¶ added in v1.9.2
func (s *Stream) WaitRunningReader()
WaitRunningReader waits for a running reader.