muxrtp

package
v0.4.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrSessionRTCPClosed is returned when a RTCP session has been closed
	ErrSessionRTCPClosed = errors.New("SessionRTCP has been closed")
)
View Source
var (
	// ErrSessionRTPClosed is returned when a RTP session has been closed
	ErrSessionRTPClosed = errors.New("SessionRTP has been closed")
)

Functions

This section is empty.

Types

type ReadStreamRTCP

type ReadStreamRTCP struct {
	// contains filtered or unexported fields
}

ReadStreamRTCP handles decryption for a single RTCP SSRC

func (*ReadStreamRTCP) Close

func (r *ReadStreamRTCP) Close() error

Close removes the ReadStream from the session and cleans up any associated state

func (*ReadStreamRTCP) GetSSRC

func (r *ReadStreamRTCP) GetSSRC() uint32

GetSSRC returns the SSRC we are demuxing for

func (*ReadStreamRTCP) Read

func (r *ReadStreamRTCP) Read(b []byte) (int, error)

Read reads and decrypts full RTCP packet from the nextConn

func (*ReadStreamRTCP) ReadRTCP

func (r *ReadStreamRTCP) ReadRTCP(buf []byte) ([]rtcp.Packet, error)

ReadRTCP reads full RTCP packet

type ReadStreamRTP

type ReadStreamRTP struct {
	// contains filtered or unexported fields
}

ReadStreamRTP handles decryption for a single RTP SSRC

func (*ReadStreamRTP) Close

func (r *ReadStreamRTP) Close() error

Close removes the ReadStream from the session and cleans up any associated state

func (*ReadStreamRTP) GetSSRC

func (r *ReadStreamRTP) GetSSRC() uint32

GetSSRC returns the SSRC we are demuxing for

func (*ReadStreamRTP) Read

func (r *ReadStreamRTP) Read(buf []byte) (int, error)

Read reads and decrypts full RTP packet from the nextConn

func (*ReadStreamRTP) ReadRTP

func (r *ReadStreamRTP) ReadRTP(buf []byte) (int, *rtp.Packet, error)

ReadRTP reads and decrypts full RTP packet and its header from the nextConn

type SessionRTCP

type SessionRTCP struct {
	// contains filtered or unexported fields
}

func NewSessionRTCP

func NewSessionRTCP(conn net.Conn) (*SessionRTCP, error)

NewSessionRTCP creates a RTCP session using conn as the underlying transport.

func (*SessionRTCP) AcceptStream

func (s *SessionRTCP) AcceptStream() (*ReadStreamRTCP, uint32, error)

AcceptStream returns a stream to handle RTCP for a single SSRC

func (*SessionRTCP) Close

func (s *SessionRTCP) Close() error

Close ends the session

func (*SessionRTCP) OpenReadStream

func (s *SessionRTCP) OpenReadStream(SSRC uint32) (*ReadStreamRTCP, error)

OpenReadStream opens a read stream for the given SSRC, it can be used if you want a certain SSRC, but don't want to wait for AcceptStream

func (*SessionRTCP) OpenWriteStream

func (s *SessionRTCP) OpenWriteStream() (*WriteStreamRTCP, error)

OpenWriteStream returns the global write stream for the Session

type SessionRTP

type SessionRTP struct {
	// contains filtered or unexported fields
}

func NewSessionRTP

func NewSessionRTP(conn net.Conn) (*SessionRTP, error)

func (*SessionRTP) AcceptStream

func (s *SessionRTP) AcceptStream() (*ReadStreamRTP, uint32, error)

AcceptStream returns a stream to handle RTCP for a single SSRC

func (*SessionRTP) Close

func (s *SessionRTP) Close() error

Close ends the session

func (*SessionRTP) OpenReadStream

func (s *SessionRTP) OpenReadStream(SSRC uint32) (*ReadStreamRTP, error)

OpenReadStream opens a read stream for the given SSRC, it can be used if you want a certain SSRC, but don't want to wait for AcceptStream

func (*SessionRTP) OpenWriteStream

func (s *SessionRTP) OpenWriteStream() (*WriteStreamRTP, error)

OpenWriteStream returns the global write stream for the Session

type WriteStreamRTCP

type WriteStreamRTCP struct {
	// contains filtered or unexported fields
}

WriteStreamRTCP is stream for a single Session that is used to encrypt RTCP

func (*WriteStreamRTCP) Write

func (w *WriteStreamRTCP) Write(b []byte) (int, error)

Write encrypts and writes a full RTCP packets to the nextConn

func (*WriteStreamRTCP) WriteRTCP

func (w *WriteStreamRTCP) WriteRTCP(header *rtcp.Header, payload []byte) (int, error)

Write a RTCP header and its payload to the nextConn

func (*WriteStreamRTCP) WriteRawRTCP

func (w *WriteStreamRTCP) WriteRawRTCP(data []byte) (int, error)

Write a RTCP header and its payload to the nextConn

type WriteStreamRTP

type WriteStreamRTP struct {
	// contains filtered or unexported fields
}

WriteStreamRTP is stream for a single Session that is used to encrypt RTP

func (*WriteStreamRTP) WriteRTP

func (w *WriteStreamRTP) WriteRTP(header *rtp.Header, payload []byte) (int, error)

WriteRTP encrypts a RTP packet and writes to the connection

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL