Wire up RTX in VideoReceiveStream.

Also adds a test to make sure that a retransmitted frame is actually
received and decoded on the remote side. The previous NACK test checked
retransmission, but not that the receiver actually takes care of the
retransmitted packet.

BUG=2399
R=mflodman@webrtc.org, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/7469004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5422 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org
2014-01-24 09:30:53 +00:00
parent 8d375c95b7
commit c279a5d72c
10 changed files with 253 additions and 124 deletions

View File

@ -156,9 +156,11 @@ VideoSendStream::VideoSendStream(newapi::Transport* transport,
if (config.encoder) {
external_codec_ = ViEExternalCodec::GetInterface(video_engine);
if (external_codec_->RegisterExternalSendCodec(
channel_, config.codec.plType, config.encoder,
config.internal_source) != 0) {
if (external_codec_->RegisterExternalSendCodec(channel_,
config.codec.plType,
config.encoder,
config.internal_source) !=
0) {
abort();
}
}
@ -168,9 +170,8 @@ VideoSendStream::VideoSendStream(newapi::Transport* transport,
abort();
if (overuse_detection) {
overuse_observer_.reset(
new ResolutionAdaptor(codec_, channel_, config_.codec.width,
config_.codec.height));
overuse_observer_.reset(new ResolutionAdaptor(
codec_, channel_, config_.codec.width, config_.codec.height));
video_engine_base_->RegisterCpuOveruseObserver(channel_,
overuse_observer_.get());
}
@ -187,8 +188,7 @@ VideoSendStream::VideoSendStream(newapi::Transport* transport,
codec_->SuspendBelowMinBitrate(channel_);
}
stats_proxy_.reset(
new SendStatisticsProxy(config, this));
stats_proxy_.reset(new SendStatisticsProxy(config, this));
rtp_rtcp_->RegisterSendChannelRtcpStatisticsCallback(channel_,
stats_proxy_.get());
@ -282,7 +282,9 @@ bool VideoSendStream::SetCodec(const VideoCodec& codec) {
static_cast<unsigned char>(i));
}
config_.codec = codec;
if (&config_.codec != &codec)
config_.codec = codec;
if (config_.rtp.rtx.ssrcs.empty())
return true;
@ -295,10 +297,8 @@ bool VideoSendStream::SetCodec(const VideoCodec& codec) {
static_cast<unsigned char>(i));
}
if (config_.rtp.rtx.rtx_payload_type != 0) {
rtp_rtcp_->SetRtxSendPayloadType(channel_,
config_.rtp.rtx.rtx_payload_type);
}
if (config_.rtp.rtx.payload_type != 0)
rtp_rtcp_->SetRtxSendPayloadType(channel_, config_.rtp.rtx.payload_type);
return true;
}