Documentation
¶
Index ¶
- Constants
- Variables
- type Conn
- type Proxy
- type ProxyConn
- type RTSPClient
- func (client *RTSPClient) ChangeSpeed(scale float64) error
- func (client *RTSPClient) Close()
- func (client *RTSPClient) CodecUpdatePPS(val []byte)
- func (client *RTSPClient) CodecUpdateSPS(val []byte)
- func (client *RTSPClient) CodecUpdateVPS(val []byte)
- func (client *RTSPClient) ControlTrack(track string) string
- func (client *RTSPClient) Println(v ...interface{})
- func (client *RTSPClient) RTPDemuxer(payloadRAW *[]byte) ([]*av.Packet, bool)
- func (client *RTSPClient) SeekTime(startTime string, scale float64, endTime string) error
- type RTSPClientOptions
- type Server
Constants ¶
View Source
const ( SignalStreamRTPStop = iota SignalCodecUpdate )
View Source
const ( VIDEO = "video" AUDIO = "audio" )
View Source
const ( RTPHeaderSize = 12 RTCPSenderReport = 200 RTCPReceiverReport = 201 )
View Source
const ( DESCRIBE = "DESCRIBE" OPTIONS = "OPTIONS" PLAY = "PLAY" SETUP = "SETUP" TEARDOWN = "TEARDOWN" )
View Source
const ( // Keep-alive interval in seconds KeepAliveInterval = 25 // Channel buffer sizes SignalChannelSize = 100 ProxyQueueSize = 3000 PacketQueueSize = 3000 MaxProxyQueueLoad = 2000 MaxPacketQueueLoad = 2000 MaxKeepAliveRespSize = 768 MinRTPPacketSize = 12 MaxRTPPacketSize = 65535 DefaultAudioTimeScale = 8000 )
Configuration constants
View Source
const ( // VideoTimeBase 视频 RTP 时钟频率 90kHz VideoTimeBase = 90000 // TimeDelay 默认 CompositionTime 延迟(毫秒) TimeDelay = 1 // MaxSeqNumHalf 序列号回绕检测阈值(16位序列号的一半) MaxSeqNumHalf = 0x8000 // MaxTimestampHalf 时间戳回绕检测阈值(32位时间戳的一半) MaxTimestampHalf = 0x80000000 )
View Source
const ( StartCodePS = 0x000001ba StartCodeSYS = 0x000001bb StartCodeMAP = 0x000001bc StartCodeVideo = 0x000001e0 StartCodeAudio = 0x000001c0 MEPGProgramEndCode = 0x000001b9 )
View Source
const ( StreamIDVideo = 0xe0 StreamIDAudio = 0xc0 )
View Source
const ( UDPTransfer int = 0 TCPTransferActive int = 1 TCPTransferPassive int = 2 LocalCache int = 3 )
View Source
const ( StreamTypeH264 = 0x1b StreamTypeH265 = 0x24 StreamTypeAAC = 0x90 )
Variables ¶
View Source
var Debug bool
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Proxy ¶
type ProxyConn ¶
type RTSPClient ¶
type RTSPClient struct {
SDPRaw []byte
Signals chan int
OutgoingProxyQueue chan *[]byte
OutgoingPacketQueue chan *av.Packet
BufferRtpPacket *bytes.Buffer
CodecData []av.CodecData
AudioTimeLine time.Duration
AudioTimeScale int64
PreAudioTS int64
PreVideoTS int64
PreSequenceNumber int
FPS int
WaitCodec bool
// contains filtered or unexported fields
}
func Dial ¶
func Dial(options RTSPClientOptions) (*RTSPClient, error)
func DialWithConn ¶
func DialWithConn(options RTSPClientOptions, conn net.Conn) (*RTSPClient, error)
func ReplayDial ¶
func ReplayDial(options RTSPClientOptions, startTime string) (*RTSPClient, error)
func (*RTSPClient) ChangeSpeed ¶
func (client *RTSPClient) ChangeSpeed(scale float64) error
func (*RTSPClient) Close ¶
func (client *RTSPClient) Close()
func (*RTSPClient) CodecUpdatePPS ¶
func (client *RTSPClient) CodecUpdatePPS(val []byte)
func (*RTSPClient) CodecUpdateSPS ¶
func (client *RTSPClient) CodecUpdateSPS(val []byte)
func (*RTSPClient) CodecUpdateVPS ¶
func (client *RTSPClient) CodecUpdateVPS(val []byte)
func (*RTSPClient) ControlTrack ¶
func (client *RTSPClient) ControlTrack(track string) string
func (*RTSPClient) Println ¶
func (client *RTSPClient) Println(v ...interface{})
Println mini logging functions
type RTSPClientOptions ¶
Source Files
¶
- client.go
- demuxer.go
- proxy.go
- server.go
Click to show internal directories.
Click to hide internal directories.