(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) {
|
static int IntervalToFps(int64 interval) {
|
||||||
|
if (!interval) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return static_cast<int>(talk_base::kNumNanosecsPerSec / interval);
|
return static_cast<int>(talk_base::kNumNanosecsPerSec / interval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,6 +57,7 @@ TEST(VideoCommonTest, TestVideoFormatFps) {
|
|||||||
EXPECT_EQ(VideoFormat::kMinimumInterval, VideoFormat::FpsToInterval(0));
|
EXPECT_EQ(VideoFormat::kMinimumInterval, VideoFormat::FpsToInterval(0));
|
||||||
EXPECT_EQ(talk_base::kNumNanosecsPerSec / 20, VideoFormat::FpsToInterval(20));
|
EXPECT_EQ(talk_base::kNumNanosecsPerSec / 20, VideoFormat::FpsToInterval(20));
|
||||||
EXPECT_EQ(20, VideoFormat::IntervalToFps(talk_base::kNumNanosecsPerSec / 20));
|
EXPECT_EQ(20, VideoFormat::IntervalToFps(talk_base::kNumNanosecsPerSec / 20));
|
||||||
|
EXPECT_EQ(0, VideoFormat::IntervalToFps(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test IsSize0x0
|
// Test IsSize0x0
|
||||||
|
@ -1713,7 +1713,7 @@ class VideoMediaChannelTest : public testing::Test,
|
|||||||
// instead of packets.
|
// instead of packets.
|
||||||
EXPECT_EQ(0, renderer2_.num_rendered_frames());
|
EXPECT_EQ(0, renderer2_.num_rendered_frames());
|
||||||
// Give a chance for the decoder to process before adding the receiver.
|
// 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.
|
// Test sending and receiving on second stream.
|
||||||
EXPECT_TRUE(channel_->AddRecvStream(
|
EXPECT_TRUE(channel_->AddRecvStream(
|
||||||
cricket::StreamParams::CreateLegacy(kSsrc + 2)));
|
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.
|
// Tests that we cannot receive key frames with unsignalled recv disabled.
|
||||||
void TwoStreamsSendAndFailUnsignalledRecv(const cricket::VideoCodec& codec) {
|
void TwoStreamsSendAndFailUnsignalledRecv(const cricket::VideoCodec& codec) {
|
||||||
cricket::VideoOptions vmo;
|
cricket::VideoOptions vmo;
|
||||||
|
vmo.conference_mode.Set(true);
|
||||||
vmo.unsignalled_recv_stream_limit.Set(0);
|
vmo.unsignalled_recv_stream_limit.Set(0);
|
||||||
EXPECT_TRUE(channel_->SetOptions(vmo));
|
EXPECT_TRUE(channel_->SetOptions(vmo));
|
||||||
SetUpSecondStreamWithNoRecv();
|
SetUpSecondStreamWithNoRecv();
|
||||||
@ -1738,6 +1739,7 @@ class VideoMediaChannelTest : public testing::Test,
|
|||||||
EXPECT_TRUE(channel_->SetRender(true));
|
EXPECT_TRUE(channel_->SetRender(true));
|
||||||
Send(codec);
|
Send(codec);
|
||||||
EXPECT_EQ_WAIT(2, NumRtpPackets(), kTimeout);
|
EXPECT_EQ_WAIT(2, NumRtpPackets(), kTimeout);
|
||||||
|
talk_base::Thread::Current()->ProcessMessages(100);
|
||||||
EXPECT_EQ_WAIT(1, renderer_.num_rendered_frames(), kTimeout);
|
EXPECT_EQ_WAIT(1, renderer_.num_rendered_frames(), kTimeout);
|
||||||
EXPECT_EQ_WAIT(0, renderer2_.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.
|
// 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));
|
EXPECT_TRUE(channel_->SetRender(true));
|
||||||
Send(codec);
|
Send(codec);
|
||||||
EXPECT_EQ_WAIT(2, NumRtpPackets(), kTimeout);
|
EXPECT_EQ_WAIT(2, NumRtpPackets(), kTimeout);
|
||||||
EXPECT_EQ_WAIT(1, renderer_.num_rendered_frames(), kTimeout);
|
// In one-to-one mode, we deliver frames to the default channel if there
|
||||||
EXPECT_EQ_WAIT(0, renderer2_.num_rendered_frames(), kTimeout);
|
// 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.
|
// 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.
|
// Test sending and receiving on second stream.
|
||||||
EXPECT_TRUE(channel_->AddRecvStream(
|
EXPECT_TRUE(channel_->AddRecvStream(
|
||||||
cricket::StreamParams::CreateLegacy(kSsrc + 2)));
|
cricket::StreamParams::CreateLegacy(kSsrc + 2)));
|
||||||
@ -1780,8 +1783,7 @@ class VideoMediaChannelTest : public testing::Test,
|
|||||||
EXPECT_TRUE_WAIT(renderer_.num_rendered_frames() >= 1, kTimeout);
|
EXPECT_TRUE_WAIT(renderer_.num_rendered_frames() >= 1, kTimeout);
|
||||||
EXPECT_EQ_WAIT(4, NumRtpPackets(), kTimeout);
|
EXPECT_EQ_WAIT(4, NumRtpPackets(), kTimeout);
|
||||||
// We dont expect any frames here, because the key frame would have been
|
// 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
|
// delivered to default channel.
|
||||||
// receive.
|
|
||||||
EXPECT_EQ(0, renderer2_.num_rendered_frames());
|
EXPECT_EQ(0, renderer2_.num_rendered_frames());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2597,10 +2597,13 @@ void WebRtcVideoMediaChannel::OnPacketReceived(
|
|||||||
int processing_channel = GetRecvChannelNum(ssrc);
|
int processing_channel = GetRecvChannelNum(ssrc);
|
||||||
if (processing_channel == -1) {
|
if (processing_channel == -1) {
|
||||||
// Allocate an unsignalled recv channel for processing in conference mode.
|
// Allocate an unsignalled recv channel for processing in conference mode.
|
||||||
if (!InConferenceMode() ||
|
if (!InConferenceMode()) {
|
||||||
!CreateUnsignalledRecvChannel(ssrc, &processing_channel)) {
|
|
||||||
// If we cant find or allocate one, use the default.
|
// If we cant find or allocate one, use the default.
|
||||||
processing_channel = video_channel();
|
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(
|
bool WebRtcVideoMediaChannel::CreateUnsignalledRecvChannel(
|
||||||
uint32 ssrc_key, int* out_channel_id) {
|
uint32 ssrc_key, int* out_channel_id) {
|
||||||
int unsignalled_recv_channel_limit = 0;
|
int unsignalled_recv_channel_limit =
|
||||||
// TODO(tvsriram): Enable this once we fix handling packets
|
options_.unsignalled_recv_stream_limit.GetWithDefaultIfUnset(
|
||||||
// in default channel with unsignalled recv.
|
kNumDefaultUnsignalledVideoRecvStreams);
|
||||||
// options_.unsignalled_recv_stream_limit.GetWithDefaultIfUnset(
|
|
||||||
// kNumDefaultUnsignalledVideoRecvStreams);
|
|
||||||
if (num_unsignalled_recv_channels_ >= unsignalled_recv_channel_limit) {
|
if (num_unsignalled_recv_channels_ >= unsignalled_recv_channel_limit) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2095,30 +2095,26 @@ TEST_F(WebRtcVideoMediaChannelTest, TwoStreamsReUseFirstStream) {
|
|||||||
0));
|
0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(tvsriram): Fix these tests with unsignalled recv before adding again.
|
TEST_F(WebRtcVideoMediaChannelTest, TwoStreamsSendAndUnsignalledRecv) {
|
||||||
TEST_F(WebRtcVideoMediaChannelTest, DISABLED_TwoStreamsSendAndUnsignalledRecv) {
|
|
||||||
Base::TwoStreamsSendAndUnsignalledRecv(cricket::VideoCodec(100, "VP8", 640,
|
Base::TwoStreamsSendAndUnsignalledRecv(cricket::VideoCodec(100, "VP8", 640,
|
||||||
400, 30, 0));
|
400, 30, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(tvsriram): Fix these tests with unsignalled recv before adding again.
|
|
||||||
TEST_F(WebRtcVideoMediaChannelTest,
|
TEST_F(WebRtcVideoMediaChannelTest,
|
||||||
DISABLED_TwoStreamsSendAndFailUnsignalledRecv) {
|
TwoStreamsSendAndFailUnsignalledRecv) {
|
||||||
webrtc::Trace::set_level_filter(webrtc::kTraceAll);
|
webrtc::Trace::set_level_filter(webrtc::kTraceAll);
|
||||||
Base::TwoStreamsSendAndFailUnsignalledRecv(
|
Base::TwoStreamsSendAndFailUnsignalledRecv(
|
||||||
cricket::VideoCodec(100, "VP8", 640, 400, 30, 0));
|
cricket::VideoCodec(100, "VP8", 640, 400, 30, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(tvsriram): Fix these tests with unsignalled recv before adding again.
|
|
||||||
TEST_F(WebRtcVideoMediaChannelTest,
|
TEST_F(WebRtcVideoMediaChannelTest,
|
||||||
DISABLED_TwoStreamsSendAndFailUnsignalledRecvInOneToOne) {
|
TwoStreamsSendAndFailUnsignalledRecvInOneToOne) {
|
||||||
Base::TwoStreamsSendAndFailUnsignalledRecvInOneToOne(
|
Base::TwoStreamsSendAndFailUnsignalledRecvInOneToOne(
|
||||||
cricket::VideoCodec(100, "VP8", 640, 400, 30, 0));
|
cricket::VideoCodec(100, "VP8", 640, 400, 30, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(tvsriram): Fix these tests with unsignalled recv before adding again.
|
|
||||||
TEST_F(WebRtcVideoMediaChannelTest,
|
TEST_F(WebRtcVideoMediaChannelTest,
|
||||||
DISABLED_TwoStreamsAddAndRemoveUnsignalledRecv) {
|
TwoStreamsAddAndRemoveUnsignalledRecv) {
|
||||||
Base::TwoStreamsAddAndRemoveUnsignalledRecv(cricket::VideoCodec(100, "VP8",
|
Base::TwoStreamsAddAndRemoveUnsignalledRecv(cricket::VideoCodec(100, "VP8",
|
||||||
640, 400, 30,
|
640, 400, 30,
|
||||||
0));
|
0));
|
||||||
|
Loading…
Reference in New Issue
Block a user