mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-07 04:08:13 +08:00
时间戳改为64位
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user