rtsp

package
v0.0.0-...-b172891 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(uri string) (media.VideoSource, error)

func ParseURL

func ParseURL(rawurl string) (*url.URL, error)

Types

type Client

type Client struct {
	sync.Mutex
	// contains filtered or unexported fields
}

RTSP 1.0 client implementation. See [RFC 2326](https://tools.ietf.org/html/rfc2326).

func Dial

func Dial(address string) (*Client, error)

func DialContext

func DialContext(ctx context.Context, address string) (*Client, error)

func (*Client) Describe

func (cli *Client) Describe(uri string) (sdp.Session, error)

Send a DESCRIBE request, and parse the SDP response.

func (*Client) GetParameter

func (cli *Client) GetParameter(uri, session string) (string, error)

Send a GET_PARAMETER request, and return the response. TODO: What should the request body be?

func (*Client) Options

func (cli *Client) Options() ([]string, error)

Send an OPTIONS request, and parse the response from the Public header..

func (*Client) Pause

func (cli *Client) Pause(uri, session string) error

Send a PAUSE request. See https://tools.ietf.org/html/rfc2326#section-10.6

func (*Client) Play

func (cli *Client) Play(uri, session string) (rtpInfo string, err error)

See https://tools.ietf.org/html/rfc2326#section-10.5

func (*Client) Request

func (cli *Client) Request(method, uri string, headers HeaderMap) (*Response, error)

Sends a request to the RTSP server, and parses the response.

func (*Client) Setup

func (cli *Client) Setup(uri string) (*Transport, string, error)

Send a SETUP request, and return the established transport and session ID. See https://tools.ietf.org/html/rfc2326#section-10.4

func (*Client) Teardown

func (cli *Client) Teardown(uri, session string) error

Send a TEARDOWN request. See https://tools.ietf.org/html/rfc2326#section-10.7

type HeaderMap

type HeaderMap map[string]string

type RequestFailure

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

func (*RequestFailure) Error

func (f *RequestFailure) Error() string

type Response

type Response struct {
	Status  int
	Reason  string
	Headers HeaderMap
	Content []byte
}

type Transport

type Transport struct {
	RTP  *net.UDPConn
	RTCP *net.UDPConn

	SSRC uint32
	Mode string
}

func NewTransport

func NewTransport() (*Transport, error)

func (*Transport) ClientHeader

func (tr *Transport) ClientHeader() string

func (*Transport) Close

func (tr *Transport) Close() error

func (*Transport) Header

func (tr *Transport) Header() string

Jump to

Keyboard shortcuts

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