rtsp

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package rtsp contains a RTSP server.

Index

Constants

This section is empty.

Variables

View Source
var ErrConnNotFound = errors.New("connection not found")

ErrConnNotFound is returned when a connection is not found.

View Source
var ErrSessionNotFound = errors.New("session not found")

ErrSessionNotFound is returned when a session is not found.

Functions

This section is empty.

Types

type Server

type Server struct {
	Address             string
	AuthMethods         []auth.ValidateMethod
	ReadTimeout         conf.StringDuration
	WriteTimeout        conf.StringDuration
	WriteQueueSize      int
	UseUDP              bool
	UseMulticast        bool
	RTPAddress          string
	RTCPAddress         string
	MulticastIPRange    string
	MulticastRTPPort    int
	MulticastRTCPPort   int
	IsTLS               bool
	ServerCert          string
	ServerKey           string
	RTSPAddress         string
	Protocols           map[conf.Protocol]struct{}
	RunOnConnect        string
	RunOnConnectRestart bool
	RunOnDisconnect     string
	ExternalCmdPool     *externalcmd.Pool
	PathManager         serverPathManager
	Parent              serverParent
	// contains filtered or unexported fields
}

Server is a RTSP server.

func (*Server) APIConnsGet

func (s *Server) APIConnsGet(uuid uuid.UUID) (*defs.APIRTSPConn, error)

APIConnsGet is called by api.

func (*Server) APIConnsList

func (s *Server) APIConnsList() (*defs.APIRTSPConnsList, error)

APIConnsList is called by api and metrics.

func (*Server) APISessionsGet

func (s *Server) APISessionsGet(uuid uuid.UUID) (*defs.APIRTSPSession, error)

APISessionsGet is called by api.

func (*Server) APISessionsKick

func (s *Server) APISessionsKick(uuid uuid.UUID) error

APISessionsKick is called by api.

func (*Server) APISessionsList

func (s *Server) APISessionsList() (*defs.APIRTSPSessionList, error)

APISessionsList is called by api and metrics.

func (*Server) Close

func (s *Server) Close()

Close closes the server.

func (*Server) Initialize

func (s *Server) Initialize() error

Initialize initializes the server.

func (*Server) Log

func (s *Server) Log(level logger.Level, format string, args ...interface{})

Log implements logger.Writer.

func (*Server) OnAnnounce

func (s *Server) OnAnnounce(ctx *gortsplib.ServerHandlerOnAnnounceCtx) (*base.Response, error)

OnAnnounce implements gortsplib.ServerHandlerOnAnnounce.

func (*Server) OnConnClose

func (s *Server) OnConnClose(ctx *gortsplib.ServerHandlerOnConnCloseCtx)

OnConnClose implements gortsplib.ServerHandlerOnConnClose.

func (*Server) OnConnOpen

func (s *Server) OnConnOpen(ctx *gortsplib.ServerHandlerOnConnOpenCtx)

OnConnOpen implements gortsplib.ServerHandlerOnConnOpen.

func (*Server) OnDecodeError

func (s *Server) OnDecodeError(ctx *gortsplib.ServerHandlerOnDecodeErrorCtx)

OnDecodeError implements gortsplib.ServerHandlerOnDecodeError.

func (*Server) OnDescribe

func (s *Server) OnDescribe(ctx *gortsplib.ServerHandlerOnDescribeCtx,
) (*base.Response, *gortsplib.ServerStream, error)

OnDescribe implements gortsplib.ServerHandlerOnDescribe.

func (*Server) OnPacketLost

func (s *Server) OnPacketLost(ctx *gortsplib.ServerHandlerOnPacketLostCtx)

OnPacketLost implements gortsplib.ServerHandlerOnDecodeError.

func (*Server) OnPause

func (s *Server) OnPause(ctx *gortsplib.ServerHandlerOnPauseCtx) (*base.Response, error)

OnPause implements gortsplib.ServerHandlerOnPause.

func (*Server) OnPlay

func (s *Server) OnPlay(ctx *gortsplib.ServerHandlerOnPlayCtx) (*base.Response, error)

OnPlay implements gortsplib.ServerHandlerOnPlay.

func (*Server) OnRecord

func (s *Server) OnRecord(ctx *gortsplib.ServerHandlerOnRecordCtx) (*base.Response, error)

OnRecord implements gortsplib.ServerHandlerOnRecord.

func (*Server) OnRequest

func (s *Server) OnRequest(sc *gortsplib.ServerConn, req *base.Request)

OnRequest implements gortsplib.ServerHandlerOnRequest.

func (*Server) OnResponse

func (s *Server) OnResponse(sc *gortsplib.ServerConn, res *base.Response)

OnResponse implements gortsplib.ServerHandlerOnResponse.

func (*Server) OnSessionClose

func (s *Server) OnSessionClose(ctx *gortsplib.ServerHandlerOnSessionCloseCtx)

OnSessionClose implements gortsplib.ServerHandlerOnSessionClose.

func (*Server) OnSessionOpen

func (s *Server) OnSessionOpen(ctx *gortsplib.ServerHandlerOnSessionOpenCtx)

OnSessionOpen implements gortsplib.ServerHandlerOnSessionOpen.

func (*Server) OnSetup

func (s *Server) OnSetup(ctx *gortsplib.ServerHandlerOnSetupCtx) (*base.Response, *gortsplib.ServerStream, error)

OnSetup implements gortsplib.ServerHandlerOnSetup.

func (*Server) OnStreamWriteError

func (s *Server) OnStreamWriteError(ctx *gortsplib.ServerHandlerOnStreamWriteErrorCtx)

OnStreamWriteError implements gortsplib.ServerHandlerOnStreamWriteError.

Jump to

Keyboard shortcuts

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