Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about OutgoingPacketQueue memory used. #38

Open
fallowu opened this issue Oct 28, 2021 · 0 comments
Open

about OutgoingPacketQueue memory used. #38

fallowu opened this issue Oct 28, 2021 · 0 comments

Comments

@fallowu
Copy link

fallowu commented Oct 28, 2021

Hi,
I used the RTSPToHls to play H.264 camera.
is it still pull rtsp video stream if i won't to preview it?
the OutgoingPacketQueue will take ~2000M(if one packet is 1M) memory?

client := &RTSPClient{
	headers:             make(map[string]string),
	Signals:             make(chan int, 100),
	OutgoingProxyQueue:  make(chan *[]byte, 3000),
	OutgoingPacketQueue: make(chan *av.Packet, 3000),
	BufferRtpPacket:     bytes.NewBuffer([]byte{}),
	videoID:             -1,
	audioID:             -2,
	videoIDX:            -1,
	audioIDX:            -2,
	options:             options,
	AudioTimeScale:      8000,
}
		pkt, got := client.RTPDemuxer(&content)
		if !got {
			continue
		}
		for _, i2 := range pkt {
			if len(client.OutgoingPacketQueue) > 2000 {
				client.Println("RTSP Client OutgoingPacket Chanel Full")
				return
			}
			client.OutgoingPacketQueue <- i2
		}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant