summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authormflodman@webrtc.org <mflodman@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-07-24 16:41:25 +0000
committermflodman@webrtc.org <mflodman@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-07-24 16:41:25 +0000
commit4a1b3e3a69d349b0d3e91f607f24e02d8b975688 (patch)
treeda30959f40b1c31a881a2f5df8734c8e65432c32 /modules
parenta4dc1ae57dff218db6e18471eee6dec2108189fe (diff)
downloadwebrtc-4a1b3e3a69d349b0d3e91f607f24e02d8b975688.tar.gz
Make sure padding is sent on the first sending RTP module.
R=stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/13989004 git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6774 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'modules')
-rw-r--r--modules/rtp_rtcp/source/rtp_rtcp_impl.cc8
-rw-r--r--modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc6
2 files changed, 5 insertions, 9 deletions
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
index a26b36a5..1a3b79cb 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
@@ -613,14 +613,10 @@ int ModuleRtpRtcpImpl::TimeToSendPadding(int bytes) {
}
} else {
CriticalSectionScoped lock(critical_section_module_ptrs_.get());
- // Decide what media stream to pad on based on a round-robin scheme.
for (size_t i = 0; i < child_modules_.size(); ++i) {
- padding_index_ = (padding_index_ + 1) % child_modules_.size();
// Send padding on one of the modules sending media.
- if (child_modules_[padding_index_]->SendingMedia() &&
- child_modules_[padding_index_]->rtp_sender_.GetTargetBitrate() > 0) {
- return child_modules_[padding_index_]->rtp_sender_.TimeToSendPadding(
- bytes);
+ if (child_modules_[i]->SendingMedia()) {
+ return child_modules_[i]->rtp_sender_.TimeToSendPadding(bytes);
}
}
}
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc
index e4507c34..3101a1fe 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc
@@ -388,7 +388,7 @@ class RtpSendingTest : public ::testing::Test {
VideoCodec codec_;
};
-TEST_F(RtpSendingTest, RoundRobinPadding) {
+TEST_F(RtpSendingTest, DISABLED_RoundRobinPadding) {
// We have to send on an SSRC to be allowed to pad, since a marker bit must
// be sent prior to padding packets.
const uint8_t payload[200] = {0};
@@ -410,7 +410,7 @@ TEST_F(RtpSendingTest, RoundRobinPadding) {
ExpectPadding(expected_padding);
}
-TEST_F(RtpSendingTest, RoundRobinPaddingRtx) {
+TEST_F(RtpSendingTest, DISABLED_RoundRobinPaddingRtx) {
// Enable RTX to allow padding to be sent prior to media.
for (int i = 1; i < codec_.numberOfSimulcastStreams + 1; ++i) {
// Abs-send-time is needed to be allowed to send padding prior to media,
@@ -440,7 +440,7 @@ TEST_F(RtpSendingTest, RoundRobinPaddingRtx) {
ExpectPadding(expected_padding);
}
-TEST_F(RtpSendingTest, RoundRobinPaddingRtxRedundantPayloads) {
+TEST_F(RtpSendingTest, DISABLED_RoundRobinPaddingRtxRedundantPayloads) {
for (int i = 1; i < codec_.numberOfSimulcastStreams + 1; ++i) {
senders_[i]->SetRtxSendPayloadType(96);
senders_[i]->SetRtxSsrc(kSenderRtxSsrc + i);