Documentation ¶
Index ¶
- Constants
- type BufferedPacket
- func (pkt *BufferedPacket) AppendNalSlice(slice []byte) *BufferedPacket
- func (pkt *BufferedPacket) Len() int
- func (pkt *BufferedPacket) NaluType() byte
- func (pkt *BufferedPacket) Renew(idx int8, compositionTime time.Duration, duration, t time.Duration) *BufferedPacket
- func (pkt *BufferedPacket) Reset()
- type RTSPClient
- 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)
- type RTSPClientOptions
Constants ¶
View Source
const ( SignalStreamRTPStop = iota SignalCodecUpdate )
View Source
const ( VIDEO = "video" AUDIO = "audio" )
View Source
const ( DESCRIBE = "DESCRIBE" OPTIONS = "OPTIONS" PLAY = "PLAY" SETUP = "SETUP" TEARDOWN = "TEARDOWN" )
View Source
const (
RTPHeaderSize = 12
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferedPacket ¶
type BufferedPacket struct { IsKeyFrame bool // video packet is key frame Idx int8 // stream index in container format CompositionTime time.Duration // packet presentation time minus decode time for H264 B-Frame Time time.Duration // packet decode time Duration time.Duration //packet duration Buffered *bytes.Buffer }
缓存的avPacket
func (*BufferedPacket) AppendNalSlice ¶
func (pkt *BufferedPacket) AppendNalSlice(slice []byte) *BufferedPacket
func (*BufferedPacket) Len ¶
func (pkt *BufferedPacket) Len() int
func (*BufferedPacket) NaluType ¶
func (pkt *BufferedPacket) NaluType() byte
func (*BufferedPacket) Renew ¶
func (pkt *BufferedPacket) Renew(idx int8, compositionTime time.Duration, duration, t time.Duration) *BufferedPacket
func (*BufferedPacket) Reset ¶
func (pkt *BufferedPacket) Reset()
type RTSPClient ¶
type RTSPClient struct { SDPRaw []byte Signals chan int OutgoingProxyQueue chan *[]byte OutgoingPacketQueue chan *av.Packet //缓存RTP包数据FU-A分片包的中间数据 BufferRtpPacket *BufferedPacket CodecData []av.CodecData AudioTimeLine time.Duration AudioTimeScale int64 PreAudioTS int64 PreVideoTS int64 PreSequenceNumber int FPS int // contains filtered or unexported fields }
func Dial ¶
func Dial(options RTSPClientOptions) (*RTSPClient, 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
func (*RTSPClient) RTPDemuxer ¶
func (client *RTSPClient) RTPDemuxer(payloadRAW *[]byte) ([]*av.Packet, bool)
Click to show internal directories.
Click to hide internal directories.