rtmputils

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadMetadata

func ReadMetadata(conn *Conn) (*gortsplib.Track, *gortsplib.Track, error)

ReadMetadata extracts track informations from a RTMP connection that is publishing.

func WriteMetadata

func WriteMetadata(conn *Conn, videoTrack *gortsplib.Track, audioTrack *gortsplib.Track) error

WriteMetadata writes track informations to a RTMP connection that is reading.

Types

type Conn

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

Conn contains a RTMP connection and a net connection.

func NewConn

func NewConn(rconn *rtmp.Conn, nconn net.Conn) *Conn

NewConn allocates a Conn.

func (*Conn) IsPublishing

func (c *Conn) IsPublishing() bool

IsPublishing returns whether the connection is publishing.

func (*Conn) NetConn

func (c *Conn) NetConn() net.Conn

NetConn returns the underlying net.Conn.

func (*Conn) ReadPacket

func (c *Conn) ReadPacket() (av.Packet, error)

ReadPacket reads a packet.

func (*Conn) URL

func (c *Conn) URL() *url.URL

URL returns the URL requested by the connection.

func (*Conn) WritePacket

func (c *Conn) WritePacket(pkt av.Packet) error

WritePacket writes a packet.

type RTCPSenderSet

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

RTCPSenderSet is a set of RTCP senders.

func NewRTCPSenderSet

func NewRTCPSenderSet(
	tracks gortsplib.Tracks,
	onFrame func(int, gortsplib.StreamType, []byte),
) *RTCPSenderSet

NewRTCPSenderSet allocates a RTCPSenderSet.

func (*RTCPSenderSet) Close

func (s *RTCPSenderSet) Close()

Close closes a RTCPSenderSet.

func (*RTCPSenderSet) ProcessFrame

func (s *RTCPSenderSet) ProcessFrame(trackID int, t time.Time,
	streamType gortsplib.StreamType, f []byte)

ProcessFrame sends a frame to the senders.

Jump to

Keyboard shortcuts

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