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

RTC: Fix rtc to rtmp sync timestamp using sender report. (#2470)

* fix annotation spell failed

* RTC to RTMP using SenderReport to sync av timestamp

* update pion/webrtc versio from v3.0.4 -> v3.0.13, auto config sender/receiver report

* Add rtc push flv play regression test

* Add unit test of ntp and av sync time

* Take flag CXX to makefile of utest

* Add annotation about rtc unit test

* Fix compiler error in C++98

* Add FFmpeg log callback funciton.
This commit is contained in:
john 2021-08-16 17:32:35 -05:00 committed by GitHub
parent 5e876277b6
commit ea8cff6163
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
301 changed files with 13882 additions and 8323 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.