支持remb控制推流比特率

This commit is contained in:
xia-chu
2021-04-28 15:41:36 +08:00
parent 9396270ce2
commit 726e909601
5 changed files with 47 additions and 6 deletions

View File

@@ -1241,10 +1241,18 @@ const RtcMedia *RtcSession::getMedia(TrackType type) const{
return nullptr;
}
bool RtcSession::supportRtcpFb(const string &name, TrackType type) const {
auto media = getMedia(type);
if (!media) {
return false;
}
auto &ref = media->plan[0].rtcp_fb;
return ref.find(name) != ref.end();
}
static string const kTWCCRtcpFb = "transport-cc";
static string const kTWCCExtMap = "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01";
void RtcConfigure::RtcTrackConfigure::enableTWCC(bool enable){
if (!enable) {
rtcp_fb.erase(kTWCCRtcpFb);