优化性能

This commit is contained in:
xiongziliang 2020-10-24 23:28:56 +08:00
parent 02c4aa3f4b
commit 84784f21c4
2 changed files with 4 additions and 9 deletions

View File

@ -124,13 +124,11 @@ bool RtpReceiver::handleOneRtp(int track_index, TrackType type, int samplerate,
payload_ptr[3] = (rtp_raw_len & 0x00FF);
//拷贝rtp负载
memcpy(payload_ptr + 4, rtp_raw_ptr, rtp_raw_len);
//排序rtp
sortRtp(std::move(rtp_ptr), track_index);
return true;
}
void RtpReceiver::sortRtp(const RtpPacket::Ptr &rtp,int track_index){
_rtp_sortor[track_index].sortPacket(rtp->sequence, rtp);
//排序rtp
auto seq = rtp_ptr->sequence;
_rtp_sortor[track_index].sortPacket(seq, std::move(rtp_ptr));
return true;
}
void RtpReceiver::clear() {

View File

@ -187,9 +187,6 @@ protected:
int getJitterSize(int track_index);
int getCycleCount(int track_index);
private:
void sortRtp(const RtpPacket::Ptr &rtp , int track_index);
private:
uint32_t _ssrc[2] = {0, 0};
//ssrc不匹配计数