(Auto)update libjingle 69306183-> 69323802
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6454 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
587ef60056
commit
53f57936c1
@ -31,6 +31,12 @@ const int kMsCallbackWait = 500;
|
||||
const int kMinHdHeight = 720;
|
||||
const uint32 kTimeout = 5000U;
|
||||
|
||||
void NormalizeVideoSize(int* expected_width, int* expected_height) {
|
||||
// WebRtcVideoFrame truncates the frame size to a multiple of 4.
|
||||
*expected_width = *expected_width & ~3;
|
||||
*expected_height = *expected_height & ~3;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
// Sets the elapsed time in the video frame to 0.
|
||||
@ -228,6 +234,59 @@ TEST_F(VideoCapturerTest, ScreencastScaledMaxPixels) {
|
||||
EXPECT_EQ(2, renderer_.num_rendered_frames());
|
||||
}
|
||||
|
||||
TEST_F(VideoCapturerTest, ScreencastScaledOddWidth) {
|
||||
capturer_.SetScreencast(true);
|
||||
|
||||
int kWidth = 1281;
|
||||
int kHeight = 720;
|
||||
|
||||
std::vector<cricket::VideoFormat> formats;
|
||||
formats.push_back(cricket::VideoFormat(kWidth, kHeight,
|
||||
cricket::VideoFormat::FpsToInterval(5), cricket::FOURCC_ARGB));
|
||||
capturer_.ResetSupportedFormats(formats);
|
||||
|
||||
EXPECT_EQ(cricket::CS_RUNNING, capturer_.Start(cricket::VideoFormat(
|
||||
kWidth,
|
||||
kHeight,
|
||||
cricket::VideoFormat::FpsToInterval(30),
|
||||
cricket::FOURCC_ARGB)));
|
||||
EXPECT_TRUE(capturer_.IsRunning());
|
||||
EXPECT_EQ(0, renderer_.num_rendered_frames());
|
||||
int expected_width = kWidth;
|
||||
int expected_height = kHeight;
|
||||
NormalizeVideoSize(&expected_width, &expected_height);
|
||||
renderer_.SetSize(expected_width, expected_height, 0);
|
||||
EXPECT_TRUE(capturer_.CaptureFrame());
|
||||
EXPECT_EQ(1, renderer_.num_rendered_frames());
|
||||
}
|
||||
|
||||
TEST_F(VideoCapturerTest, ScreencastScaledSuperLarge) {
|
||||
capturer_.SetScreencast(true);
|
||||
|
||||
const int kMaxWidth = 4096;
|
||||
const int kMaxHeight = 3072;
|
||||
int kWidth = kMaxWidth + 4;
|
||||
int kHeight = kMaxHeight + 4;
|
||||
|
||||
std::vector<cricket::VideoFormat> formats;
|
||||
formats.push_back(cricket::VideoFormat(kWidth, kHeight,
|
||||
cricket::VideoFormat::FpsToInterval(5), cricket::FOURCC_ARGB));
|
||||
capturer_.ResetSupportedFormats(formats);
|
||||
|
||||
EXPECT_EQ(cricket::CS_RUNNING, capturer_.Start(cricket::VideoFormat(
|
||||
kWidth,
|
||||
kHeight,
|
||||
cricket::VideoFormat::FpsToInterval(30),
|
||||
cricket::FOURCC_ARGB)));
|
||||
EXPECT_TRUE(capturer_.IsRunning());
|
||||
EXPECT_EQ(0, renderer_.num_rendered_frames());
|
||||
int expected_width = 2050;
|
||||
int expected_height = 1538;
|
||||
NormalizeVideoSize(&expected_width, &expected_height);
|
||||
renderer_.SetSize(expected_width, expected_height, 0);
|
||||
EXPECT_TRUE(capturer_.CaptureFrame());
|
||||
EXPECT_EQ(1, renderer_.num_rendered_frames());
|
||||
}
|
||||
|
||||
TEST_F(VideoCapturerTest, TestFourccMatch) {
|
||||
cricket::VideoFormat desired(640, 480,
|
||||
|
Loading…
x
Reference in New Issue
Block a user