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

Squash: Fix rtc to rtmp sync timestamp using sender report. #2470

This commit is contained in:
winlin 2021-08-17 07:25:03 +08:00
parent 3d58e98d1c
commit 85620a34f5
309 changed files with 14837 additions and 8525 deletions

View file

@ -762,6 +762,7 @@ SrsRtpPacket::SrsRtpPacket()
frame_type = SrsFrameTypeReserved;
cached_payload_size = 0;
decode_handler = NULL;
avsync_time_ = -1;
++_srs_pps_objs_rtps->sugar;
}
@ -835,6 +836,8 @@ SrsRtpPacket* SrsRtpPacket::copy()
// For performance issue, do not copy the unused field.
cp->decode_handler = decode_handler;
cp->avsync_time_ = avsync_time_;
return cp;
}

View file

@ -294,6 +294,8 @@ private:
int cached_payload_size;
// The helper handler for decoder, use RAW payload if NULL.
ISrsRtspPacketDecodeHandler* decode_handler;
private:
int64_t avsync_time_;
public:
SrsRtpPacket();
virtual ~SrsRtpPacket();
@ -329,6 +331,8 @@ public:
virtual srs_error_t decode(SrsBuffer* buf);
public:
bool is_keyframe();
void set_avsync_time(int64_t avsync_time) { avsync_time_ = avsync_time; }
int64_t get_avsync_time() const { return avsync_time_; }
};
// Single payload data.