Versions in this module Expand all Collapse all v2 v2.0.0 Jun 30, 2023 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) + 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, medias media.Medias) (*base.Response, error) + func (c *Client) Close() error + func (c *Client) Describe(u *url.URL) (media.Medias, *url.URL, *base.Response, error) + func (c *Client) OnPacketRTCP(medi *media.Media, cb func(rtcp.Packet)) + func (c *Client) OnPacketRTCPAny(cb func(*media.Media, rtcp.Packet)) + func (c *Client) OnPacketRTP(medi *media.Media, forma format.Format, cb func(*rtp.Packet)) + func (c *Client) OnPacketRTPAny(cb func(*media.Media, format.Format, *rtp.Packet)) + 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(media *media.Media, baseURL *url.URL, rtpPort int, rtcpPort int) (*base.Response, error) + func (c *Client) SetupAll(medias media.Medias, baseURL *url.URL) error + func (c *Client) Start(scheme string, host string) error + func (c *Client) StartRecording(address string, medias media.Medias) error + func (c *Client) Wait() error + func (c *Client) WritePacketRTCP(medi *media.Media, pkt rtcp.Packet) error + func (c *Client) WritePacketRTP(medi *media.Media, pkt *rtp.Packet) error + func (c *Client) WritePacketRTPWithNTP(medi *media.Media, pkt *rtp.Packet, ntp time.Time) error + 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 + UDPEnableTimeout bool + 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 + Medias media.Medias + Path string + Query string + Request *base.Request + Server *Server + Session *ServerSession + 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 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 + Transport Transport + type ServerSession struct + func (ss *ServerSession) AnnouncedMedias() media.Medias + func (ss *ServerSession) BytesReceived() uint64 + func (ss *ServerSession) BytesSent() uint64 + func (ss *ServerSession) Close() error + func (ss *ServerSession) OnPacketRTCP(medi *media.Media, cb func(rtcp.Packet)) + func (ss *ServerSession) OnPacketRTCPAny(cb func(*media.Media, rtcp.Packet)) + func (ss *ServerSession) OnPacketRTP(medi *media.Media, forma format.Format, cb func(*rtp.Packet)) + func (ss *ServerSession) OnPacketRTPAny(cb func(*media.Media, format.Format, *rtp.Packet)) + func (ss *ServerSession) SetUserData(v interface{}) + func (ss *ServerSession) SetuppedMedias() media.Medias + func (ss *ServerSession) SetuppedTransport() *Transport + func (ss *ServerSession) State() ServerSessionState + func (ss *ServerSession) UserData() interface{} + func (ss *ServerSession) WritePacketRTCP(medi *media.Media, pkt rtcp.Packet) + func (ss *ServerSession) WritePacketRTP(medi *media.Media, pkt *rtp.Packet) + type ServerSessionState int + const ServerSessionStateInitial + const ServerSessionStatePlay + const ServerSessionStatePrePlay + const ServerSessionStatePreRecord + const ServerSessionStateRecord + func (s ServerSessionState) String() string + type ServerStream struct + func NewServerStream(medias media.Medias) *ServerStream + func (st *ServerStream) Close() error + func (st *ServerStream) Medias() media.Medias + func (st *ServerStream) WritePacketRTCP(medi *media.Media, pkt rtcp.Packet) + func (st *ServerStream) WritePacketRTP(medi *media.Media, pkt *rtp.Packet) + func (st *ServerStream) WritePacketRTPWithNTP(medi *media.Media, pkt *rtp.Packet, ntp time.Time) + type Transport int + const TransportTCP + const TransportUDP + const TransportUDPMulticast + func (t Transport) String() string