mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +08:00
remb改成固定间隔发送
This commit is contained in:
parent
6274cbdd28
commit
8f17fcdf1d
@ -416,10 +416,6 @@ void WebRtcTransportImp::onStartWebRTC() {
|
|||||||
|
|
||||||
if (canRecvRtp()) {
|
if (canRecvRtp()) {
|
||||||
_push_src->setSdp(getSdp(SdpType::answer).toRtspSdp());
|
_push_src->setSdp(getSdp(SdpType::answer).toRtspSdp());
|
||||||
GET_CONFIG(size_t, remb_bit_rate, RTC::kRembBitRate);
|
|
||||||
if (remb_bit_rate && getSdp(SdpType::answer).supportRtcpFb("goog-remb")) {
|
|
||||||
sendRtcpRemb(_recv_video_ssrc, remb_bit_rate);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (canSendRtp()) {
|
if (canSendRtp()) {
|
||||||
_reader = _play_src->getRing()->attach(getPoller(), true);
|
_reader = _play_src->getRing()->attach(getPoller(), true);
|
||||||
@ -624,6 +620,12 @@ void WebRtcTransportImp::onSortedRtp(const RtpPayloadInfo &info, RtpPacket::Ptr
|
|||||||
//定期发送pli请求关键帧,方便非rtc等协议
|
//定期发送pli请求关键帧,方便非rtc等协议
|
||||||
_pli_ticker.resetTime();
|
_pli_ticker.resetTime();
|
||||||
sendRtcpPli(_recv_video_ssrc);
|
sendRtcpPli(_recv_video_ssrc);
|
||||||
|
|
||||||
|
//开启remb,则发送remb包调节比特率
|
||||||
|
GET_CONFIG(size_t, remb_bit_rate, RTC::kRembBitRate);
|
||||||
|
if (remb_bit_rate) {
|
||||||
|
sendRtcpRemb(_recv_video_ssrc, remb_bit_rate);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (_push_src) {
|
if (_push_src) {
|
||||||
_push_src->onWrite(std::move(rtp), false);
|
_push_src->onWrite(std::move(rtp), false);
|
||||||
|
Loading…
Reference in New Issue
Block a user