rtsp player trust sdp pt ,ingore other pt compatible hik nvr record

This commit is contained in:
xiongguangjie
2022-07-17 00:26:07 +08:00
parent 7db7d5bec0
commit 3eaf7897a7
4 changed files with 14 additions and 1 deletions

View File

@@ -175,6 +175,7 @@ public:
uint32_t getSSRC() const;
RtpPacket::Ptr inputRtp(TrackType type, int sample_rate, uint8_t *ptr, size_t len);
void setNtpStamp(uint32_t rtp_stamp, uint64_t ntp_stamp_ms);
void setPT(uint8_t pt);
protected:
virtual void onRtpSorted(RtpPacket::Ptr rtp) {}
@@ -252,6 +253,11 @@ public:
_track[index].setNtpStamp(rtp_stamp, ntp_stamp_ms);
}
void setPT(int index, uint8_t pt){
assert(index < kCount && index >= 0);
_track[index].setPT(pt);
}
void clear() {
for (auto &track : _track) {
track.clear();