mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Refine code
This commit is contained in:
parent
e82e28d83e
commit
aac2f1debd
1 changed files with 2 additions and 5 deletions
|
@ -1756,16 +1756,13 @@ srs_error_t SrsRtcConnection::dispatch_rtcp(SrsRtcpCommon* rtcp)
|
||||||
|
|
||||||
// For TWCC packet.
|
// For TWCC packet.
|
||||||
if (SrsRtcpType_rtpfb == rtcp->type() && 15 == rtcp->get_rc()) {
|
if (SrsRtcpType_rtpfb == rtcp->type() && 15 == rtcp->get_rc()) {
|
||||||
if(srs_success != (err = on_rtcp_feedback_twcc(rtcp->data(), rtcp->size()))) {
|
return on_rtcp_feedback_twcc(rtcp->data(), rtcp->size());
|
||||||
return srs_error_wrap(err, "twcc feedback");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// For REMB packet.
|
// For REMB packet.
|
||||||
if (SrsRtcpType_psfb == rtcp->type()) {
|
if (SrsRtcpType_psfb == rtcp->type()) {
|
||||||
SrsRtcpPsfbCommon* psfb = dynamic_cast<SrsRtcpPsfbCommon*>(rtcp);
|
SrsRtcpPsfbCommon* psfb = dynamic_cast<SrsRtcpPsfbCommon*>(rtcp);
|
||||||
//TODO: user const to replace 15
|
if (15 == psfb->get_rc()) {
|
||||||
if(15 == psfb->get_rc()) {
|
|
||||||
return on_rtcp_feedback_remb(psfb);
|
return on_rtcp_feedback_remb(psfb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue