rtsp

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MIT Imports: 25 Imported by: 1

README

Documentation

Index

Constants

View Source
const (
	ProtoRTSP      = "RTSP/1.0"
	MethodOptions  = "OPTIONS"
	MethodSetup    = "SETUP"
	MethodTeardown = "TEARDOWN"
	MethodDescribe = "DESCRIBE"
	MethodPlay     = "PLAY"
	MethodPause    = "PAUSE"
	MethodAnnounce = "ANNOUNCE"
	MethodRecord   = "RECORD"
)

Variables

This section is empty.

Functions

func UnmarshalSDP

func UnmarshalSDP(rawSDP []byte) ([]*core.Media, error)

Types

type Conn

type Conn struct {
	core.Listener

	Backchannel bool
	SessionName string

	Medias    []*core.Media
	Session   string
	UserAgent string
	URL       *url.URL
	// contains filtered or unexported fields
}

func NewClient

func NewClient(uri string) *Conn

func NewServer

func NewServer(conn net.Conn) *Conn

func (*Conn) Accept

func (c *Conn) Accept() error

func (*Conn) AddTrack

func (c *Conn) AddTrack(media *core.Media, codec *core.Codec, track *core.Receiver) (err error)

func (*Conn) Announce added in v1.2.0

func (c *Conn) Announce() (err error)

func (*Conn) Auth

func (c *Conn) Auth(username, password string)

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) Describe

func (c *Conn) Describe() error

func (*Conn) Dial

func (c *Conn) Dial() (err error)

func (*Conn) Do

func (c *Conn) Do(req *tcp.Request) (*tcp.Response, error)

Do send Request and receive and process Response

func (*Conn) GetMedias

func (c *Conn) GetMedias() []*core.Media

func (*Conn) GetTrack

func (c *Conn) GetTrack(media *core.Media, codec *core.Codec) (*core.Receiver, error)

func (*Conn) Handle

func (c *Conn) Handle() (err error)

func (*Conn) MarshalJSON

func (c *Conn) MarshalJSON() ([]byte, error)

func (*Conn) Options

func (c *Conn) Options() error

func (*Conn) Play

func (c *Conn) Play() (err error)

func (*Conn) Request

func (c *Conn) Request(req *tcp.Request) error

Request sends only Request

func (*Conn) Response

func (c *Conn) Response(res *tcp.Response) error

func (*Conn) Setup

func (c *Conn) Setup() error

func (*Conn) SetupMedia

func (c *Conn) SetupMedia(media *core.Media, first bool) (byte, error)

func (*Conn) Start

func (c *Conn) Start() error

func (*Conn) Stop

func (c *Conn) Stop() error

func (*Conn) Teardown

func (c *Conn) Teardown() (err error)

type RTCP

type RTCP struct {
	Channel byte
	Header  rtcp.Header
	Packets []rtcp.Packet
}

type State

type State byte
const (
	StateNone State = iota
	StateConn
	StateSetup
	StatePlay
	StateHandle
)

func (State) String

func (s State) String() string

Jump to

Keyboard shortcuts

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