-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bugs for RTC2RTMP. #2768
Fix bugs for RTC2RTMP. #2768
Conversation
xiaozhihong
commented
Dec 2, 2021
- Cache IDR frame's rtp timestamp instead of avsync timestamp.
- Cache clock rate calculate by sender report.
- Using srs_rtp_seq_distance instead of direct minus.
- Add utest of av timestamp sync when duplicated sender report.
trunk/src/app/srs_app_rtc_source.hpp
Outdated
@@ -307,7 +307,7 @@ class SrsRtmpFromRtcBridger : public ISrsRtcSourceBridger | |||
RtcPacketCache cache_video_pkts_[s_cache_size]; | |||
uint16_t header_sn_; | |||
uint16_t lost_sn_; | |||
int64_t key_frame_ts_; | |||
int64_t key_frame_ts_; // RTP timestamp, no rtmp. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- key_frame_ts_: The meaning expressed is the timestamp of the RTP key frame. The variable is defined as rtp_key_frame_ts_. No need to add comments, as the meaning is clear from the variable name.
- If additional comments are required, they can be added as a new line above the variable. Follow the same formatting as other comments. 😄
TRANS_BY_GPT3
|
||
// Check sys_time_elapsed is equal to zero. | ||
if (fpclassify(sys_time_elapsed) == FP_ZERO) { | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fpclassify was introduced in C++11. Should we consider older versions of gcc?
https://en.cppreference.com/w/cpp/numeric/math/fpclassify
TRANS_BY_GPT3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ed7a3d2
to
ea569ab
Compare
Codecov Report
@@ Coverage Diff @@
## 4.0release #2768 +/- ##
==============================================
+ Coverage 60.11% 60.15% +0.03%
==============================================
Files 121 121
Lines 50896 50947 +51
==============================================
+ Hits 30597 30648 +51
Misses 20299 20299 | Impacted Files | Coverage Δ | |' Translated to English while maintaining the markdown structure: '| Impacted Files | Coverage Δ | | Translated to English while maintaining the markdown structure: | trunk/src/app/srs_app_rtc_source.hpp | Continue to review full report at Codecov.
Translated to English while maintaining the markdown structure: |
|