1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

SquashSRS4: Remove object cache and stat api

This commit is contained in:
winlin 2021-05-14 18:17:42 +08:00
parent f711eb79ed
commit 6a980683f7
44 changed files with 141 additions and 1277 deletions

View file

@ -55,7 +55,7 @@ SrsRtpRingBuffer::~SrsRtpRingBuffer()
{
for (int i = 0; i < capacity_; ++i) {
SrsRtpPacket2* pkt = queue_[i];
_srs_rtp_cache->recycle(pkt);
srs_freep(pkt);
}
srs_freepa(queue_);
}
@ -80,10 +80,7 @@ void SrsRtpRingBuffer::advance_to(uint16_t seq)
void SrsRtpRingBuffer::set(uint16_t at, SrsRtpPacket2* pkt)
{
SrsRtpPacket2* p = queue_[at % capacity_];
if (p) {
_srs_rtp_cache->recycle(p);
}
srs_freep(p);
queue_[at % capacity_] = pkt;
}
@ -170,7 +167,7 @@ void SrsRtpRingBuffer::clear_histroy(uint16_t seq)
for (uint16_t i = 0; i < capacity_; i++) {
SrsRtpPacket2* p = queue_[i];
if (p && p->header.get_sequence() < seq) {
_srs_rtp_cache->recycle(p);
srs_freep(p);
queue_[i] = NULL;
}
}
@ -181,7 +178,7 @@ void SrsRtpRingBuffer::clear_all_histroy()
for (uint16_t i = 0; i < capacity_; i++) {
SrsRtpPacket2* p = queue_[i];
if (p) {
_srs_rtp_cache->recycle(p);
srs_freep(p);
queue_[i] = NULL;
}
}