sgortsp

package
v0.0.0-...-115120a Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// status code
	OK                   = "200 OK"
	BadRequest           = "400 Bad Request"
	Unauthorized         = "401 Unauthorized"
	Forbidden            = "403 Forbidden"
	NotFound             = "404 Not Found"
	MethodNotAllowed     = "405 Method Not Allowed"
	NotAcceptable        = "406 Not Acceptable"
	Gone                 = "410 Gone"
	RequestTooLarge      = "413 Request Message Body Too Large"
	UnsupportedMedia     = "415 Unsupported Media Type"
	SessionNotFound      = "453 Session Not Found"
	NotValidState        = "455 Method Not Valid in This State"
	HeaderNotValid       = "456 Header Field not Valid for Resource"
	InvalidRange         = "457 Invalid Range"
	UnsupportedTransport = "461 Unsupported Transport"
	InternalError        = "500 Internal Server Error"
	NotImplemented       = "501 Not Implemented"
	BadGateway           = "502 Bad Gateway"
	Unavailable          = "503 Service Unavailable"
	VersionNotSupported  = "505 RTSP Version Not Supported"
	OptionNotSupported   = "551 Option Not Supported"
)
View Source
const (
	CRLF    = "\r\n"
	VERSION = "RTSP/1.0"
)
View Source
const (
	UNDEFINED = iota
	REQUEST
	RESPONSE
)

Variables

View Source
var ServerPort int = 40400
View Source
var (
	UdpPort = flag.String("udp", "47000", "rtp packet port")
)

Functions

This section is empty.

Types

type Message

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

func (*Message) AppendHeader

func (m *Message) AppendHeader(k, v string)

func (*Message) AppendToBody

func (m *Message) AppendToBody(s string)

type Msg

type Msg interface {
	AppendHeader(string, string)
	AppendToBody(string)
}

type RTP

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

func (*RTP) Packet

func (r *RTP) Packet(body []byte, payloadType byte, frameN, framePeriod int) []byte

type RTSP

type RTSP struct {
	Router
	// contains filtered or unexported fields
}

RTSP main type Manage Requests/Responses and Sessions

func (*RTSP) Close

func (sv *RTSP) Close()

RTSP dealloc

func (*RTSP) Init

func (sv *RTSP) Init()

RTSP Initializer

type Request

type Request struct {
	Message
	// contains filtered or unexported fields
}

type Response

type Response struct {
	Message
	// contains filtered or unexported fields
}

type Router

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

func (*Router) Init

func (r *Router) Init()

func (*Router) Parse

func (r *Router) Parse(uri string) (*routes.Resource, error)

type Session

type Session struct {
	Streamer
	// contains filtered or unexported fields
}

func (*Session) Close

func (s *Session) Close()

func (*Session) Init

func (s *Session) Init(a net.Addr, transp string) error

func (*Session) ParseTransport

func (s *Session) ParseTransport(transp string) []transport

func (*Session) Send

func (s *Session) Send() error

type Streamer

type Streamer struct {
	FrameN      int
	FramePeriod int
	Type        byte
	Data        []byte
	// contains filtered or unexported fields
}

func (*Streamer) Close

func (s *Streamer) Close() error

func (*Streamer) Init

func (s *Streamer) Init(path string) error

func (*Streamer) NextFrame

func (s *Streamer) NextFrame() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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