Versions in this module Expand all Collapse all v1 v1.0.1 Dec 12, 2022 v1.0.0 Dec 11, 2022 Changes in this version + type Client struct + AnyPortEnable bool + BytesReceived *uint64 + BytesSent *uint64 + DialContext func(ctx context.Context, network, address string) (net.Conn, error) + DisableRTCPSenderReports bool + InitialUDPReadTimeout time.Duration + ListenPacket func(network, address string) (net.PacketConn, error) + OnDecodeError func(error) + OnPacketRTCP func(*ClientOnPacketRTCPCtx) + OnPacketRTP func(*ClientOnPacketRTPCtx) + OnRequest func(*base.Request) + OnResponse func(*base.Response) + ReadBufferCount int + ReadTimeout time.Duration + RedirectDisable bool + TLSConfig *tls.Config + Transport *Transport + UserAgent string + WriteBufferCount int + WriteTimeout time.Duration + func (c *Client) Announce(u *url.URL, tracks Tracks) (*base.Response, error) + func (c *Client) Close() error + func (c *Client) Describe(u *url.URL) (Tracks, *url.URL, *base.Response, error) + func (c *Client) Options(u *url.URL) (*base.Response, error) + func (c *Client) Pause() (*base.Response, error) + func (c *Client) Play(ra *headers.Range) (*base.Response, error) + func (c *Client) Record() (*base.Response, error) + func (c *Client) Seek(ra *headers.Range) (*base.Response, error) + func (c *Client) Setup(track Track, baseURL *url.URL, rtpPort int, rtcpPort int) (*base.Response, error) + func (c *Client) SetupAll(tracks Tracks, baseURL *url.URL) error + func (c *Client) SetupAndPlay(tracks Tracks, baseURL *url.URL) error + func (c *Client) Start(scheme string, host string) error + func (c *Client) StartPublishing(address string, tracks Tracks) error + func (c *Client) Tracks() Tracks + func (c *Client) Wait() error + func (c *Client) WritePacketRTCP(trackID int, pkt rtcp.Packet) error + func (c *Client) WritePacketRTP(trackID int, pkt *rtp.Packet) error + func (c *Client) WritePacketRTPWithNTP(trackID int, pkt *rtp.Packet, ntp time.Time) error + type ClientOnPacketRTCPCtx struct + Packet rtcp.Packet + TrackID int + type ClientOnPacketRTPCtx struct + Packet *rtp.Packet + TrackID int + type Server struct + DisableRTCPSenderReports bool + Handler ServerHandler + Listen func(network string, address string) (net.Listener, error) + ListenPacket func(network, address string) (net.PacketConn, error) + MulticastIPRange string + MulticastRTCPPort int + MulticastRTPPort int + RTSPAddress string + ReadBufferCount int + ReadTimeout time.Duration + TLSConfig *tls.Config + UDPRTCPAddress string + UDPRTPAddress string + WriteBufferCount int + WriteTimeout time.Duration + func (s *Server) Close() error + func (s *Server) Start() error + func (s *Server) StartAndWait() error + func (s *Server) Wait() error + type ServerConn struct + func (sc *ServerConn) BytesReceived() uint64 + func (sc *ServerConn) BytesSent() uint64 + func (sc *ServerConn) Close() error + func (sc *ServerConn) NetConn() net.Conn + func (sc *ServerConn) SetUserData(v interface{}) + func (sc *ServerConn) UserData() interface{} + type ServerHandler interface + type ServerHandlerOnAnnounce interface + OnAnnounce func(*ServerHandlerOnAnnounceCtx) (*base.Response, error) + type ServerHandlerOnAnnounceCtx struct + Conn *ServerConn + Path string + Query string + Request *base.Request + Server *Server + Session *ServerSession + Tracks Tracks + type ServerHandlerOnConnClose interface + OnConnClose func(*ServerHandlerOnConnCloseCtx) + type ServerHandlerOnConnCloseCtx struct + Conn *ServerConn + Error error + type ServerHandlerOnConnOpen interface + OnConnOpen func(*ServerHandlerOnConnOpenCtx) + type ServerHandlerOnConnOpenCtx struct + Conn *ServerConn + type ServerHandlerOnDecodeError interface + OnDecodeError func(*ServerHandlerOnDecodeErrorCtx) + type ServerHandlerOnDecodeErrorCtx struct + Error error + Session *ServerSession + type ServerHandlerOnDescribe interface + OnDescribe func(*ServerHandlerOnDescribeCtx) (*base.Response, *ServerStream, error) + type ServerHandlerOnDescribeCtx struct + Conn *ServerConn + Path string + Query string + Request *base.Request + type ServerHandlerOnGetParameter interface + OnGetParameter func(*ServerHandlerOnGetParameterCtx) (*base.Response, error) + type ServerHandlerOnGetParameterCtx struct + Conn *ServerConn + Path string + Query string + Request *base.Request + Session *ServerSession + type ServerHandlerOnPacketRTCP interface + OnPacketRTCP func(*ServerHandlerOnPacketRTCPCtx) + type ServerHandlerOnPacketRTCPCtx struct + Packet rtcp.Packet + Session *ServerSession + TrackID int + type ServerHandlerOnPacketRTP interface + OnPacketRTP func(*ServerHandlerOnPacketRTPCtx) + type ServerHandlerOnPacketRTPCtx struct + Packet *rtp.Packet + Session *ServerSession + TrackID int + type ServerHandlerOnPause interface + OnPause func(*ServerHandlerOnPauseCtx) (*base.Response, error) + type ServerHandlerOnPauseCtx struct + Conn *ServerConn + Path string + Query string + Request *base.Request + Session *ServerSession + type ServerHandlerOnPlay interface + OnPlay func(*ServerHandlerOnPlayCtx) (*base.Response, error) + type ServerHandlerOnPlayCtx struct + Conn *ServerConn + Path string + Query string + Request *base.Request + Session *ServerSession + type ServerHandlerOnRecord interface + OnRecord func(*ServerHandlerOnRecordCtx) (*base.Response, error) + type ServerHandlerOnRecordCtx struct + Conn *ServerConn + Path string + Query string + Request *base.Request + Session *ServerSession + type ServerHandlerOnRequest interface + OnRequest func(*ServerConn, *base.Request) + type ServerHandlerOnResponse interface + OnResponse func(*ServerConn, *base.Response) + type ServerHandlerOnSessionClose interface + OnSessionClose func(*ServerHandlerOnSessionCloseCtx) + type ServerHandlerOnSessionCloseCtx struct + Error error + Session *ServerSession + type ServerHandlerOnSessionOpen interface + OnSessionOpen func(*ServerHandlerOnSessionOpenCtx) + type ServerHandlerOnSessionOpenCtx struct + Conn *ServerConn + Session *ServerSession + type ServerHandlerOnSetParameter interface + OnSetParameter func(*ServerHandlerOnSetParameterCtx) (*base.Response, error) + type ServerHandlerOnSetParameterCtx struct + Conn *ServerConn + Path string + Query string + Request *base.Request + Session *ServerSession + type ServerHandlerOnSetup interface + OnSetup func(*ServerHandlerOnSetupCtx) (*base.Response, *ServerStream, error) + type ServerHandlerOnSetupCtx struct + Conn *ServerConn + Path string + Query string + Request *base.Request + Server *Server + Session *ServerSession + TrackID int + Transport Transport + type ServerSession struct + func (ss *ServerSession) AnnouncedTracks() Tracks + func (ss *ServerSession) BytesReceived() uint64 + func (ss *ServerSession) BytesSent() uint64 + func (ss *ServerSession) Close() error + func (ss *ServerSession) SetUserData(v interface{}) + func (ss *ServerSession) SetuppedTracks() map[int]*ServerSessionSetuppedTrack + func (ss *ServerSession) SetuppedTransport() *Transport + func (ss *ServerSession) State() ServerSessionState + func (ss *ServerSession) UserData() interface{} + func (ss *ServerSession) WritePacketRTCP(trackID int, pkt rtcp.Packet) + func (ss *ServerSession) WritePacketRTP(trackID int, pkt *rtp.Packet) + type ServerSessionSetuppedTrack struct + type ServerSessionState int + const ServerSessionStateInitial + const ServerSessionStatePlay + const ServerSessionStatePrePlay + const ServerSessionStatePreRecord + const ServerSessionStateRecord + func (s ServerSessionState) String() string + type ServerStream struct + func NewServerStream(tracks Tracks) *ServerStream + func (st *ServerStream) Close() error + func (st *ServerStream) Tracks() Tracks + func (st *ServerStream) WritePacketRTCP(trackID int, pkt rtcp.Packet) + func (st *ServerStream) WritePacketRTP(trackID int, pkt *rtp.Packet) + func (st *ServerStream) WritePacketRTPWithNTP(trackID int, pkt *rtp.Packet, ntp time.Time) + type Track interface + ClockRate func() int + GetControl func() string + MediaDescription func() *psdp.MediaDescription + SetControl func(string) + String func() string + type TrackG711 struct + MULaw bool + func (t *TrackG711) ClockRate() int + func (t *TrackG711) CreateDecoder() *rtpsimpleaudio.Decoder + func (t *TrackG711) CreateEncoder() *rtpsimpleaudio.Encoder + func (t *TrackG711) GetControl() string + func (t *TrackG711) MediaDescription() *psdp.MediaDescription + func (t *TrackG711) SetControl(c string) + func (t *TrackG711) String() string + type TrackG722 struct + func (t *TrackG722) ClockRate() int + func (t *TrackG722) CreateDecoder() *rtpsimpleaudio.Decoder + func (t *TrackG722) CreateEncoder() *rtpsimpleaudio.Encoder + func (t *TrackG722) GetControl() string + func (t *TrackG722) MediaDescription() *psdp.MediaDescription + func (t *TrackG722) SetControl(c string) + func (t *TrackG722) String() string + type TrackGeneric struct + Media string + Payloads []TrackGenericPayload + func (t *TrackGeneric) ClockRate() int + func (t *TrackGeneric) GetControl() string + func (t *TrackGeneric) Init() error + func (t *TrackGeneric) MediaDescription() *psdp.MediaDescription + func (t *TrackGeneric) SetControl(c string) + func (t *TrackGeneric) String() string + type TrackGenericPayload struct + FMTP string + RTPMap string + Type uint8 + type TrackH264 struct + PPS []byte + PacketizationMode int + PayloadType uint8 + SPS []byte + func (t *TrackH264) ClockRate() int + func (t *TrackH264) CreateDecoder() *rtph264.Decoder + func (t *TrackH264) CreateEncoder() *rtph264.Encoder + func (t *TrackH264) GetControl() string + func (t *TrackH264) MediaDescription() *psdp.MediaDescription + func (t *TrackH264) SafePPS() []byte + func (t *TrackH264) SafeSPS() []byte + func (t *TrackH264) SafeSetPPS(v []byte) + func (t *TrackH264) SafeSetSPS(v []byte) + func (t *TrackH264) SetControl(c string) + func (t *TrackH264) String() string + type TrackH265 struct + MaxDONDiff int + PPS []byte + PayloadType uint8 + SPS []byte + VPS []byte + func (t *TrackH265) ClockRate() int + func (t *TrackH265) CreateDecoder() *rtph265.Decoder + func (t *TrackH265) CreateEncoder() *rtph265.Encoder + func (t *TrackH265) GetControl() string + func (t *TrackH265) MediaDescription() *psdp.MediaDescription + func (t *TrackH265) SafePPS() []byte + func (t *TrackH265) SafeSPS() []byte + func (t *TrackH265) SafeSetPPS(v []byte) + func (t *TrackH265) SafeSetSPS(v []byte) + func (t *TrackH265) SafeSetVPS(v []byte) + func (t *TrackH265) SafeVPS() []byte + func (t *TrackH265) SetControl(c string) + func (t *TrackH265) String() string + type TrackJPEG struct + func (t *TrackJPEG) ClockRate() int + func (t *TrackJPEG) GetControl() string + func (t *TrackJPEG) MediaDescription() *psdp.MediaDescription + func (t *TrackJPEG) SetControl(c string) + func (t *TrackJPEG) String() string + type TrackLPCM struct + BitDepth int + ChannelCount int + PayloadType uint8 + SampleRate int + func (t *TrackLPCM) ClockRate() int + func (t *TrackLPCM) CreateDecoder() *rtplpcm.Decoder + func (t *TrackLPCM) CreateEncoder() *rtplpcm.Encoder + func (t *TrackLPCM) GetControl() string + func (t *TrackLPCM) MediaDescription() *psdp.MediaDescription + func (t *TrackLPCM) SetControl(c string) + func (t *TrackLPCM) String() string + type TrackMPEG2Audio struct + func (t *TrackMPEG2Audio) ClockRate() int + func (t *TrackMPEG2Audio) GetControl() string + func (t *TrackMPEG2Audio) MediaDescription() *psdp.MediaDescription + func (t *TrackMPEG2Audio) SetControl(c string) + func (t *TrackMPEG2Audio) String() string + type TrackMPEG2Video struct + func (t *TrackMPEG2Video) ClockRate() int + func (t *TrackMPEG2Video) GetControl() string + func (t *TrackMPEG2Video) MediaDescription() *psdp.MediaDescription + func (t *TrackMPEG2Video) SetControl(c string) + func (t *TrackMPEG2Video) String() string + type TrackMPEG4Audio struct + Config *mpeg4audio.Config + IndexDeltaLength int + IndexLength int + PayloadType uint8 + SizeLength int + func (t *TrackMPEG4Audio) ClockRate() int + func (t *TrackMPEG4Audio) CreateDecoder() *rtpmpeg4audio.Decoder + func (t *TrackMPEG4Audio) CreateEncoder() *rtpmpeg4audio.Encoder + func (t *TrackMPEG4Audio) GetControl() string + func (t *TrackMPEG4Audio) MediaDescription() *psdp.MediaDescription + func (t *TrackMPEG4Audio) SetControl(c string) + func (t *TrackMPEG4Audio) String() string + type TrackOpus struct + ChannelCount int + PayloadType uint8 + SampleRate int + func (t *TrackOpus) ClockRate() int + func (t *TrackOpus) CreateDecoder() *rtpsimpleaudio.Decoder + func (t *TrackOpus) CreateEncoder() *rtpsimpleaudio.Encoder + func (t *TrackOpus) GetControl() string + func (t *TrackOpus) MediaDescription() *psdp.MediaDescription + func (t *TrackOpus) SetControl(c string) + func (t *TrackOpus) String() string + type TrackVP8 struct + MaxFR *int + MaxFS *int + PayloadType uint8 + func (t *TrackVP8) ClockRate() int + func (t *TrackVP8) CreateDecoder() *rtpvp8.Decoder + func (t *TrackVP8) GetControl() string + func (t *TrackVP8) MediaDescription() *psdp.MediaDescription + func (t *TrackVP8) SetControl(c string) + func (t *TrackVP8) String() string + type TrackVP9 struct + MaxFR *int + MaxFS *int + PayloadType uint8 + ProfileID *int + func (t *TrackVP9) ClockRate() int + func (t *TrackVP9) CreateDecoder() *rtpvp9.Decoder + func (t *TrackVP9) GetControl() string + func (t *TrackVP9) MediaDescription() *psdp.MediaDescription + func (t *TrackVP9) SetControl(c string) + func (t *TrackVP9) String() string + type TrackVorbis struct + ChannelCount int + Configuration []byte + PayloadType uint8 + SampleRate int + func (t *TrackVorbis) ClockRate() int + func (t *TrackVorbis) GetControl() string + func (t *TrackVorbis) MediaDescription() *psdp.MediaDescription + func (t *TrackVorbis) SetControl(c string) + func (t *TrackVorbis) String() string + type Tracks []Track + func (ts *Tracks) Unmarshal(byts []byte) (*sdp.SessionDescription, error) + func (ts Tracks) Marshal(multicast bool) []byte + type Transport int + const TransportTCP + const TransportUDP + const TransportUDPMulticast + func (t Transport) String() string Other modules containing this package github.com/aler9/gortsplib/v2