Documentation ¶
Overview ¶
Package state controls the source of the RTP packets being written to the stream's subscribers and ensures there is only one active at a time while there are peer connections to receive RTP packets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrClosed = errors.New("StreamState already closed")
ErrClosed indicates that the StreamState is already closed.
Functions ¶
This section is empty.
Types ¶
type StreamState ¶
type StreamState struct { // Stream is the StreamState's stream Stream gostream.Stream // contains filtered or unexported fields }
StreamState controls the source of the RTP packets being written to the stream's subscribers and ensures there is only one active at a time while there are subsribers.
func New ¶
New returns a new *StreamState. rtpPassthroughSource is allowed to be nil if the camere does not implement rtppassthrough.Source.
func (*StreamState) Decrement ¶
func (state *StreamState) Decrement() error
Decrement decrements the peer connections subscribed to the stream.
func (*StreamState) Increment ¶
func (state *StreamState) Increment() error
Increment increments the peer connections subscribed to the stream.