(Auto)update libjingle 63089643-> 63111035
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5705 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
cf6f46d716
commit
18e5911d92
@ -212,6 +212,9 @@ struct VideoFormat : VideoFormatPod {
|
||||
}
|
||||
|
||||
static int IntervalToFps(int64 interval) {
|
||||
if (!interval) {
|
||||
return 0;
|
||||
}
|
||||
return static_cast<int>(talk_base::kNumNanosecsPerSec / interval);
|
||||
}
|
||||
|
||||
|
@ -57,6 +57,7 @@ TEST(VideoCommonTest, TestVideoFormatFps) {
|
||||
EXPECT_EQ(VideoFormat::kMinimumInterval, VideoFormat::FpsToInterval(0));
|
||||
EXPECT_EQ(talk_base::kNumNanosecsPerSec / 20, VideoFormat::FpsToInterval(20));
|
||||
EXPECT_EQ(20, VideoFormat::IntervalToFps(talk_base::kNumNanosecsPerSec / 20));
|
||||
EXPECT_EQ(0, VideoFormat::IntervalToFps(0));
|
||||
}
|
||||
|
||||
// Test IsSize0x0
|
||||
|
@ -1713,7 +1713,7 @@ class VideoMediaChannelTest : public testing::Test,
|
||||
// instead of packets.
|
||||
EXPECT_EQ(0, renderer2_.num_rendered_frames());
|
||||
// Give a chance for the decoder to process before adding the receiver.
|
||||
talk_base::Thread::Current()->ProcessMessages(10);
|
||||
talk_base::Thread::Current()->ProcessMessages(100);
|
||||
// Test sending and receiving on second stream.
|
||||
EXPECT_TRUE(channel_->AddRecvStream(
|
||||
cricket::StreamParams::CreateLegacy(kSsrc + 2)));
|
||||
@ -1731,6 +1731,7 @@ class VideoMediaChannelTest : public testing::Test,
|
||||
// Tests that we cannot receive key frames with unsignalled recv disabled.
|
||||
void TwoStreamsSendAndFailUnsignalledRecv(const cricket::VideoCodec& codec) {
|
||||
cricket::VideoOptions vmo;
|
||||
vmo.conference_mode.Set(true);
|
||||
vmo.unsignalled_recv_stream_limit.Set(0);
|
||||
EXPECT_TRUE(channel_->SetOptions(vmo));
|
||||
SetUpSecondStreamWithNoRecv();
|
||||
@ -1738,6 +1739,7 @@ class VideoMediaChannelTest : public testing::Test,
|
||||
EXPECT_TRUE(channel_->SetRender(true));
|
||||
Send(codec);
|
||||
EXPECT_EQ_WAIT(2, NumRtpPackets(), kTimeout);
|
||||
talk_base::Thread::Current()->ProcessMessages(100);
|
||||
EXPECT_EQ_WAIT(1, renderer_.num_rendered_frames(), kTimeout);
|
||||
EXPECT_EQ_WAIT(0, renderer2_.num_rendered_frames(), kTimeout);
|
||||
// Give a chance for the decoder to process before adding the receiver.
|
||||
@ -1768,10 +1770,11 @@ class VideoMediaChannelTest : public testing::Test,
|
||||
EXPECT_TRUE(channel_->SetRender(true));
|
||||
Send(codec);
|
||||
EXPECT_EQ_WAIT(2, NumRtpPackets(), kTimeout);
|
||||
EXPECT_EQ_WAIT(1, renderer_.num_rendered_frames(), kTimeout);
|
||||
EXPECT_EQ_WAIT(0, renderer2_.num_rendered_frames(), kTimeout);
|
||||
// In one-to-one mode, we deliver frames to the default channel if there
|
||||
// is no registered recv channel for the ssrc.
|
||||
EXPECT_TRUE_WAIT(renderer_.num_rendered_frames() >= 1, kTimeout);
|
||||
// Give a chance for the decoder to process before adding the receiver.
|
||||
talk_base::Thread::Current()->ProcessMessages(10);
|
||||
talk_base::Thread::Current()->ProcessMessages(100);
|
||||
// Test sending and receiving on second stream.
|
||||
EXPECT_TRUE(channel_->AddRecvStream(
|
||||
cricket::StreamParams::CreateLegacy(kSsrc + 2)));
|
||||
@ -1780,8 +1783,7 @@ class VideoMediaChannelTest : public testing::Test,
|
||||
EXPECT_TRUE_WAIT(renderer_.num_rendered_frames() >= 1, kTimeout);
|
||||
EXPECT_EQ_WAIT(4, NumRtpPackets(), kTimeout);
|
||||
// We dont expect any frames here, because the key frame would have been
|
||||
// lost in the earlier packet. This is the case we want to solve with early
|
||||
// receive.
|
||||
// delivered to default channel.
|
||||
EXPECT_EQ(0, renderer2_.num_rendered_frames());
|
||||
}
|
||||
|
||||
|
@ -2597,10 +2597,13 @@ void WebRtcVideoMediaChannel::OnPacketReceived(
|
||||
int processing_channel = GetRecvChannelNum(ssrc);
|
||||
if (processing_channel == -1) {
|
||||
// Allocate an unsignalled recv channel for processing in conference mode.
|
||||
if (!InConferenceMode() ||
|
||||
!CreateUnsignalledRecvChannel(ssrc, &processing_channel)) {
|
||||
if (!InConferenceMode()) {
|
||||
// If we cant find or allocate one, use the default.
|
||||
processing_channel = video_channel();
|
||||
} else if (!CreateUnsignalledRecvChannel(ssrc, &processing_channel)) {
|
||||
// If we cant create an unsignalled recv channel, drop the packet in
|
||||
// conference mode.
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3149,11 +3152,9 @@ bool WebRtcVideoMediaChannel::CreateChannel(uint32 ssrc_key,
|
||||
|
||||
bool WebRtcVideoMediaChannel::CreateUnsignalledRecvChannel(
|
||||
uint32 ssrc_key, int* out_channel_id) {
|
||||
int unsignalled_recv_channel_limit = 0;
|
||||
// TODO(tvsriram): Enable this once we fix handling packets
|
||||
// in default channel with unsignalled recv.
|
||||
// options_.unsignalled_recv_stream_limit.GetWithDefaultIfUnset(
|
||||
// kNumDefaultUnsignalledVideoRecvStreams);
|
||||
int unsignalled_recv_channel_limit =
|
||||
options_.unsignalled_recv_stream_limit.GetWithDefaultIfUnset(
|
||||
kNumDefaultUnsignalledVideoRecvStreams);
|
||||
if (num_unsignalled_recv_channels_ >= unsignalled_recv_channel_limit) {
|
||||
return false;
|
||||
}
|
||||
|
@ -2095,30 +2095,26 @@ TEST_F(WebRtcVideoMediaChannelTest, TwoStreamsReUseFirstStream) {
|
||||
0));
|
||||
}
|
||||
|
||||
// TODO(tvsriram): Fix these tests with unsignalled recv before adding again.
|
||||
TEST_F(WebRtcVideoMediaChannelTest, DISABLED_TwoStreamsSendAndUnsignalledRecv) {
|
||||
TEST_F(WebRtcVideoMediaChannelTest, TwoStreamsSendAndUnsignalledRecv) {
|
||||
Base::TwoStreamsSendAndUnsignalledRecv(cricket::VideoCodec(100, "VP8", 640,
|
||||
400, 30, 0));
|
||||
}
|
||||
|
||||
// TODO(tvsriram): Fix these tests with unsignalled recv before adding again.
|
||||
TEST_F(WebRtcVideoMediaChannelTest,
|
||||
DISABLED_TwoStreamsSendAndFailUnsignalledRecv) {
|
||||
TwoStreamsSendAndFailUnsignalledRecv) {
|
||||
webrtc::Trace::set_level_filter(webrtc::kTraceAll);
|
||||
Base::TwoStreamsSendAndFailUnsignalledRecv(
|
||||
cricket::VideoCodec(100, "VP8", 640, 400, 30, 0));
|
||||
}
|
||||
|
||||
// TODO(tvsriram): Fix these tests with unsignalled recv before adding again.
|
||||
TEST_F(WebRtcVideoMediaChannelTest,
|
||||
DISABLED_TwoStreamsSendAndFailUnsignalledRecvInOneToOne) {
|
||||
TwoStreamsSendAndFailUnsignalledRecvInOneToOne) {
|
||||
Base::TwoStreamsSendAndFailUnsignalledRecvInOneToOne(
|
||||
cricket::VideoCodec(100, "VP8", 640, 400, 30, 0));
|
||||
}
|
||||
|
||||
// TODO(tvsriram): Fix these tests with unsignalled recv before adding again.
|
||||
TEST_F(WebRtcVideoMediaChannelTest,
|
||||
DISABLED_TwoStreamsAddAndRemoveUnsignalledRecv) {
|
||||
TwoStreamsAddAndRemoveUnsignalledRecv) {
|
||||
Base::TwoStreamsAddAndRemoveUnsignalledRecv(cricket::VideoCodec(100, "VP8",
|
||||
640, 400, 30,
|
||||
0));
|
||||
|
Loading…
Reference in New Issue
Block a user