Categorygithub.com/cobalt-robotics/gortsplib
modulepackage
0.0.0-20221013151933-ea4eb1938f82
Repository: https://github.com/cobalt-robotics/gortsplib.git
Documentation: pkg.go.dev

# README

gortsplib

Test Lint Go Report Card CodeCov PkgGoDev

RTSP 1.0 client and server library for the Go programming language, written for rtsp-simple-server.

Go ≥ 1.17 is required.

Features:

  • Client
    • Query servers about available streams and tracks
    • Read
      • Read streams from servers with the UDP, UDP-multicast or TCP transport protocol
      • Read TLS-encrypted streams (TCP only)
      • Switch transport protocol automatically
      • Read only selected tracks of a stream
      • Pause or seek without disconnecting from the server
      • Generate RTCP receiver reports (UDP only)
      • Reorder incoming RTP packets (UDP only)
      • Clean up non-compliant streams (remove padding, re-encode RTP packets if they are too big)
    • Publish
      • Publish streams to servers with the UDP or TCP transport protocol
      • Publish TLS-encrypted streams (TCP only)
      • Switch transport protocol automatically
      • Pause without disconnecting from the server
      • Generate RTCP sender reports (UDP only)
  • Server
    • Handle requests from clients
    • Sessions and connections are independent
    • Publish
      • Read streams from clients with the UDP or TCP transport protocol
      • Read TLS-encrypted streams (TCP only)
      • Generate RTCP receiver reports (UDP only)
      • Reorder incoming RTP packets (UDP only)
      • Clean up non-compliant streams (remove padding, re-encode RTP packets if they are too big)
    • Read
      • Write streams to clients with the UDP, UDP-multicast or TCP transport protocol
      • Write TLS-encrypted streams
      • Compute and provide SSRC, RTP-Info to clients
      • Generate RTCP sender reports (UDP only)
  • Utilities
    • Parse RTSP elements: requests, responses, SDP
    • Parse H264 elements and formats: RTP/H264, Annex-B, AVCC, anti-competition, DTS
    • Parse AAC elements and formats: RTP/AAC, ADTS, MPEG-4 audio configurations

Table of contents

Examples

API Documentation

https://pkg.go.dev/github.com/aler9/gortsplib#pkg-index

Links

Related projects

Standards

# Packages

No description provided by the author
No description provided by the author

# Functions

NewServerStream allocates a ServerStream.

# Constants

# Structs

Client is a RTSP client.
ClientOnPacketRTCPCtx is the context of a RTCP packet.
ClientOnPacketRTPCtx is the context of a RTP packet.
Server is a RTSP server.
ServerConn is a server-side RTSP connection.
ServerHandlerOnAnnounceCtx is the context of an ANNOUNCE request.
ServerHandlerOnConnCloseCtx is the context of a connection closure.
ServerHandlerOnConnOpenCtx is the context of a connection opening.
ServerHandlerOnDescribeCtx is the context of a DESCRIBE request.
ServerHandlerOnGetParameterCtx is the context of a GET_PARAMETER request.
ServerHandlerOnPacketRTCPCtx is the context of a RTCP packet.
ServerHandlerOnPacketRTPCtx is the context of a RTP packet.
ServerHandlerOnPauseCtx is the context of a PAUSE request.
ServerHandlerOnPlayCtx is the context of a PLAY request.
ServerHandlerOnRecordCtx is the context of a RECORD request.
ServerHandlerOnSessionCloseCtx is the context of a session closure.
ServerHandlerOnSessionOpenCtx is the context of a session opening.
ServerHandlerOnSetParameterCtx is the context of a SET_PARAMETER request.
ServerHandlerOnSetupCtx is the context of a OPTIONS request.
ServerSession is a server-side RTSP session.
ServerSessionSetuppedTrack is a setupped track of a ServerSession.
ServerStream represents a single stream.
TrackGeneric is a generic track.
TrackH264 is a H264 track.
TrackH265 is a H265 track.
TrackJPEG is a JPEG track.
TrackMPEG2Audio is a MPEG-1 or MPEG-2 audio track.
TrackMPEG2Video is a MPEG-1 or MPEG-2 video track.
TrackMPEG4Audio is a MPEG-4 audio track.
TrackOpus is a Opus track.
TrackPCMA is a PCMA track.
TrackPCMU is a PCMU track.
TrackVP8 is a VP8 track.
TrackVP9 is a VP9 track.

# Interfaces

ServerHandler is the interface implemented by all the server handlers.
ServerHandlerOnAnnounce can be implemented by a ServerHandler.
ServerHandlerOnConnClose can be implemented by a ServerHandler.
ServerHandlerOnConnOpen can be implemented by a ServerHandler.
ServerHandlerOnDescribe can be implemented by a ServerHandler.
ServerHandlerOnGetParameter can be implemented by a ServerHandler.
ServerHandlerOnPacketRTCP can be implemented by a ServerHandler.
ServerHandlerOnPacketRTP can be implemented by a ServerHandler.
ServerHandlerOnPause can be implemented by a ServerHandler.
ServerHandlerOnPlay can be implemented by a ServerHandler.
ServerHandlerOnRecord can be implemented by a ServerHandler.
ServerHandlerOnRequest can be implemented by a ServerHandler.
ServerHandlerOnResponse can be implemented by a ServerHandler.
ServerHandlerOnSessionClose can be implemented by a ServerHandler.
ServerHandlerOnSessionOpen can be implemented by a ServerHandler.
ServerHandlerOnSetParameter can be implemented by a ServerHandler.
ServerHandlerOnSetup can be implemented by a ServerHandler.
Track is a RTSP track.

# Type aliases

ServerSessionState is a state of a ServerSession.
Tracks is a list of tracks.
Transport is a RTSP transport protocol.