rtspcli

package
v0.0.0-...-b4d0808 Latest Latest
Warning

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

Go to latest
Published: May 9, 2020 License: BSD-2-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(socket net.Conn) (err error)

Close Socket

Types

type Request

type Request struct {
	Header []string
	URI    string
	Method string
}

Request of RTSP

type Response

type Response struct {
	BlockLength int
	Block       []byte
	BlockNo     int

	StatusCode    int
	Header        textproto.MIMEHeader
	ContentLength int
	Body          []byte
}

Response of RTSP

type SocketChannel

type SocketChannel struct {
	DebugConn bool
	// contains filtered or unexported fields
}

SocketChannel info for RTSP Connetction

func Connect

func Connect(uri string) (cli *SocketChannel, err error)

Connect to SS with timeout setting

func Open

func Open(hostURL string) (cli *SocketChannel, err error)

Open Stream

func (*SocketChannel) Describe

func (cli *SocketChannel) Describe() (streams []av.CodecData, err error)

Describe RTSP

func (*SocketChannel) Forward

func (cli *SocketChannel) Forward(message string) (str string, err error)

Forward Data

func (*SocketChannel) Options

func (cli *SocketChannel) Options() (err error)

Options RTSP

func (*SocketChannel) Play

func (cli *SocketChannel) Play() (err error)

Play Video

func (*SocketChannel) ReadPacket

func (cli *SocketChannel) ReadPacket() (pkt av.Packet, err error)

ReadPacket handle RTP Packet

func (*SocketChannel) ReadResponse

func (cli *SocketChannel) ReadResponse() (res Response, err error)

ReadResponse handle rtsp response

func (*SocketChannel) Setup

func (cli *SocketChannel) Setup(streams []int) (err error)

Setup RTSP

func (*SocketChannel) WriteRequest

func (cli *SocketChannel) WriteRequest(req Request) (err error)

WriteRequest Message to RTSP

type Stream

type Stream struct {
	av.CodecData
	Sdp sdp.Media
	// contains filtered or unexported fields
}

Stream info

func (Stream) IsAudio

func (strem Stream) IsAudio() bool

IsAudio Check Audio

func (Stream) IsVideo

func (strem Stream) IsVideo() bool

IsVideo Check Video

Jump to

Keyboard shortcuts

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