| Index: webrtc/media/engine/webrtcvideoengine2.cc
|
| diff --git a/webrtc/media/engine/webrtcvideoengine2.cc b/webrtc/media/engine/webrtcvideoengine2.cc
|
| index 335ee3a691aed1f66d1f4bc0e628d07e2618fca3..915d7bc42773255584085bd9137d5c0cc20e3d68 100644
|
| --- a/webrtc/media/engine/webrtcvideoengine2.cc
|
| +++ b/webrtc/media/engine/webrtcvideoengine2.cc
|
| @@ -1183,15 +1183,11 @@ bool WebRtcVideoChannel2::AddRecvStream(const StreamParams& sp,
|
| receive_ssrcs_.insert(used_ssrc);
|
|
|
| webrtc::VideoReceiveStream::Config config(this);
|
| - webrtc::FlexfecConfig flexfec_config;
|
| + webrtc::FlexfecReceiveStream::Config flexfec_config(this);
|
| ConfigureReceiverRtp(&config, &flexfec_config, sp);
|
|
|
| // Set up A/V sync group based on sync label.
|
| config.sync_group = sp.sync_label;
|
| -
|
| - config.rtp.remb = send_codec_ ? HasRemb(send_codec_->codec) : false;
|
| - config.rtp.transport_cc =
|
| - send_codec_ ? HasTransportCc(send_codec_->codec) : false;
|
| config.disable_prerenderer_smoothing =
|
| video_config_.disable_prerenderer_smoothing;
|
|
|
| @@ -1204,7 +1200,7 @@ bool WebRtcVideoChannel2::AddRecvStream(const StreamParams& sp,
|
|
|
| void WebRtcVideoChannel2::ConfigureReceiverRtp(
|
| webrtc::VideoReceiveStream::Config* config,
|
| - webrtc::FlexfecConfig* flexfec_config,
|
| + webrtc::FlexfecReceiveStream::Config* flexfec_config,
|
| const StreamParams& sp) const {
|
| uint32_t ssrc = sp.first_ssrc();
|
|
|
| @@ -1233,6 +1229,10 @@ void WebRtcVideoChannel2::ConfigureReceiverRtp(
|
| }
|
| }
|
|
|
| + config->rtp.remb = send_codec_ ? HasRemb(send_codec_->codec) : false;
|
| + config->rtp.transport_cc =
|
| + send_codec_ ? HasTransportCc(send_codec_->codec) : false;
|
| +
|
| for (size_t i = 0; i < recv_codecs_.size(); ++i) {
|
| uint32_t rtx_ssrc;
|
| if (recv_codecs_[i].rtx_payload_type != -1 &&
|
| @@ -1246,10 +1246,12 @@ void WebRtcVideoChannel2::ConfigureReceiverRtp(
|
|
|
| // TODO(brandtr): This code needs to be generalized when we add support for
|
| // multistream protection.
|
| - uint32_t flexfec_ssrc;
|
| - if (sp.GetFecFrSsrc(ssrc, &flexfec_ssrc)) {
|
| - flexfec_config->flexfec_ssrc = flexfec_ssrc;
|
| + if (sp.GetFecFrSsrc(ssrc, &flexfec_config->remote_ssrc)) {
|
| flexfec_config->protected_media_ssrcs = {ssrc};
|
| + flexfec_config->local_ssrc = config->rtp.local_ssrc;
|
| + flexfec_config->rtcp_mode = config->rtp.rtcp_mode;
|
| + flexfec_config->transport_cc = config->rtp.transport_cc;
|
| + flexfec_config->rtp_header_extensions = config->rtp.extensions;
|
| }
|
| }
|
|
|
| @@ -2158,7 +2160,7 @@ WebRtcVideoChannel2::WebRtcVideoReceiveStream::WebRtcVideoReceiveStream(
|
| WebRtcVideoDecoderFactory* external_decoder_factory,
|
| bool default_stream,
|
| const std::vector<VideoCodecSettings>& recv_codecs,
|
| - const webrtc::FlexfecConfig& flexfec_config)
|
| + const webrtc::FlexfecReceiveStream::Config& flexfec_config)
|
| : call_(call),
|
| stream_params_(sp),
|
| stream_(NULL),
|
| @@ -2267,8 +2269,7 @@ void WebRtcVideoChannel2::WebRtcVideoReceiveStream::ConfigureCodecs(
|
|
|
| // TODO(pbos): Reconfigure RTX based on incoming recv_codecs.
|
| config_.rtp.ulpfec = recv_codecs.front().ulpfec;
|
| - flexfec_config_.flexfec_payload_type =
|
| - recv_codecs.front().flexfec_payload_type;
|
| + flexfec_config_.payload_type = recv_codecs.front().flexfec_payload_type;
|
|
|
| config_.rtp.nack.rtp_history_ms =
|
| HasNack(recv_codecs.begin()->codec) ? kNackHistoryMs : 0;
|
| @@ -2351,16 +2352,7 @@ void WebRtcVideoChannel2::WebRtcVideoReceiveStream::RecreateWebRtcStream() {
|
| stream_ = call_->CreateVideoReceiveStream(config_.Copy());
|
| stream_->Start();
|
| if (IsFlexfecFieldTrialEnabled() && flexfec_config_.IsCompleteAndEnabled()) {
|
| - webrtc::FlexfecReceiveStream::Config config;
|
| - // Payload types and SSRCs come from the FlexFEC specific part of the SDP.
|
| - config.payload_type = flexfec_config_.flexfec_payload_type;
|
| - config.remote_ssrc = flexfec_config_.flexfec_ssrc;
|
| - config.protected_media_ssrcs = flexfec_config_.protected_media_ssrcs;
|
| - // RTCP messages and RTP header extensions apply to the entire track
|
| - // in the SDP.
|
| - config.transport_cc = config_.rtp.transport_cc;
|
| - config.rtp_header_extensions = config_.rtp.extensions;
|
| - flexfec_stream_ = call_->CreateFlexfecReceiveStream(config);
|
| + flexfec_stream_ = call_->CreateFlexfecReceiveStream(flexfec_config_);
|
| flexfec_stream_->Start();
|
| }
|
| }
|
|
|