Remove {Is,Set}BlackOutput from VideoAdapter.
BUG= R=pthatcher@webrtc.org Review URL: https://webrtc-codereview.appspot.com/39309004 Cr-Commit-Position: refs/heads/master@{#8523} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8523 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -412,65 +412,6 @@ TEST_F(VideoAdapterTest, AdaptResolutionOnTheFly) {
|
||||
listener_->GetStats(), request_format.width, request_format.height);
|
||||
}
|
||||
|
||||
// Black the output frame.
|
||||
TEST_F(VideoAdapterTest, BlackOutput) {
|
||||
adapter_->SetOutputFormat(capture_format_);
|
||||
EXPECT_EQ(CS_RUNNING, capturer_->Start(capture_format_));
|
||||
EXPECT_TRUE_WAIT(!capturer_->IsRunning() ||
|
||||
listener_->GetStats().captured_frames >= 10, kWaitTimeout);
|
||||
// Verify that the output frame is not black.
|
||||
rtc::scoped_ptr<const VideoFrame> adapted_frame(
|
||||
listener_->CopyAdaptedFrame());
|
||||
EXPECT_NE(16, *adapted_frame->GetYPlane());
|
||||
EXPECT_NE(128, *adapted_frame->GetUPlane());
|
||||
EXPECT_NE(128, *adapted_frame->GetVPlane());
|
||||
|
||||
adapter_->SetBlackOutput(true);
|
||||
int captured_frames = listener_->GetStats().captured_frames;
|
||||
EXPECT_TRUE_WAIT(
|
||||
!capturer_->IsRunning() ||
|
||||
listener_->GetStats().captured_frames >= captured_frames + 10,
|
||||
kWaitTimeout);
|
||||
// Verify that the output frame is black.
|
||||
adapted_frame.reset(listener_->CopyAdaptedFrame());
|
||||
EXPECT_EQ(16, *adapted_frame->GetYPlane());
|
||||
EXPECT_EQ(128, *adapted_frame->GetUPlane());
|
||||
EXPECT_EQ(128, *adapted_frame->GetVPlane());
|
||||
|
||||
// Verify that the elapsed time and timestamp of the black frame increase.
|
||||
int64 elapsed_time = adapted_frame->GetElapsedTime();
|
||||
int64 timestamp = adapted_frame->GetTimeStamp();
|
||||
captured_frames = listener_->GetStats().captured_frames;
|
||||
EXPECT_TRUE_WAIT(
|
||||
!capturer_->IsRunning() ||
|
||||
listener_->GetStats().captured_frames >= captured_frames + 10,
|
||||
kWaitTimeout);
|
||||
|
||||
adapted_frame.reset(listener_->CopyAdaptedFrame());
|
||||
EXPECT_GT(adapted_frame->GetElapsedTime(), elapsed_time);
|
||||
EXPECT_GT(adapted_frame->GetTimeStamp(), timestamp);
|
||||
|
||||
// Change the output size
|
||||
VideoFormat request_format = capture_format_;
|
||||
request_format.width /= 2;
|
||||
request_format.height /= 2;
|
||||
adapter_->SetOutputFormat(request_format);
|
||||
captured_frames = listener_->GetStats().captured_frames;
|
||||
EXPECT_TRUE_WAIT(
|
||||
!capturer_->IsRunning() ||
|
||||
listener_->GetStats().captured_frames >= captured_frames + 10,
|
||||
kWaitTimeout);
|
||||
|
||||
// Verify resolution change after adaptation.
|
||||
VerifyAdaptedResolution(
|
||||
listener_->GetStats(), request_format.width, request_format.height);
|
||||
// Verify that the output frame is black.
|
||||
adapted_frame.reset(listener_->CopyAdaptedFrame());
|
||||
EXPECT_EQ(16, *adapted_frame->GetYPlane());
|
||||
EXPECT_EQ(128, *adapted_frame->GetUPlane());
|
||||
EXPECT_EQ(128, *adapted_frame->GetVPlane());
|
||||
}
|
||||
|
||||
// Drop all frames.
|
||||
TEST_F(VideoAdapterTest, DropAllFrames) {
|
||||
VideoFormat format; // with resolution 0x0.
|
||||
|
||||
Reference in New Issue
Block a user