时间戳改为64位

This commit is contained in:
ziyue
2022-08-08 17:13:39 +08:00
parent 143580d780
commit 9c3b8a6a95
44 changed files with 143 additions and 143 deletions

View File

@@ -12,7 +12,7 @@
namespace mediakit{
RtpPacket::Ptr RtpInfo::makeRtp(TrackType type, const void* data, size_t len, bool mark, uint32_t stamp) {
RtpPacket::Ptr RtpInfo::makeRtp(TrackType type, const void* data, size_t len, bool mark, uint64_t stamp) {
uint16_t payload_len = (uint16_t) (len + RtpPacket::kRtpHeaderSize);
auto rtp = RtpPacket::create();
rtp->setCapacity(payload_len + RtpPacket::kRtpTcpHeaderSize);

View File

@@ -84,7 +84,7 @@ public:
return _ssrc;
}
RtpPacket::Ptr makeRtp(TrackType type,const void *data, size_t len, bool mark, uint32_t stamp);
RtpPacket::Ptr makeRtp(TrackType type,const void *data, size_t len, bool mark, uint64_t stamp);
private:
uint8_t _pt;

View File

@@ -558,8 +558,8 @@ uint32_t RtpPacket::getStamp() const {
return ntohl(getHeader()->stamp);
}
uint32_t RtpPacket::getStampMS(bool ntp) const {
return ntp ? ntp_stamp & 0xFFFFFFFF : getStamp() * uint64_t(1000) / sample_rate;
uint64_t RtpPacket::getStampMS(bool ntp) const {
return ntp ? ntp_stamp : getStamp() * uint64_t(1000) / sample_rate;
}
uint32_t RtpPacket::getSSRC() const {

View File

@@ -159,7 +159,7 @@ public:
uint16_t getSeq() const;
uint32_t getStamp() const;
//主机字节序的时间戳,已经转换为毫秒
uint32_t getStampMS(bool ntp = true) const;
uint64_t getStampMS(bool ntp = true) const;
//主机字节序的ssrc
uint32_t getSSRC() const;
//有效负载跳过csrc、ext