Commit 01d73bbd authored by David Staessens's avatar David Staessens Committed by Commit Bot

media/gpu/test: Add allocate-mode testcase to new video decoder tests.

This CL adds a new test to the video_decode_accelerator_tests binary, which
tests decoding a video in allocate mode. This test is automatically skipped on
platforms that only support allocate mode, which already run all tests in
allocate mode.

TEST=./video_decode_accelerator_tests on eve

BUG=953122

Change-Id: I82347bc7230ab9afed26199d43e55954b4a4558b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1688750
Commit-Queue: David Staessens <dstaessens@chromium.org>
Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676244}
parent 82ba4b63
......@@ -285,6 +285,27 @@ TEST_F(VideoDecoderTest, FlushAtEndOfStream_RenderThumbnails) {
->ValidateThumbnail());
}
// Play a video from start to finish, using allocate mode. This test is only run
// on platforms that support import mode, as on allocate-mode only platforms all
// tests are run in allocate mode. The test will be skipped when --use_vd is
// specified as the new video decoders only support import mode.
// TODO(dstaessens): Deprecate after switching to new VD-based video decoders.
TEST_F(VideoDecoderTest, FlushAtEndOfStream_Allocate) {
if (!g_env->ImportSupported() || g_env->UseVD())
GTEST_SKIP();
VideoDecoderClientConfig config;
config.allocation_mode = AllocationMode::kAllocate;
auto tvp = CreateVideoPlayer(g_env->Video(), config);
tvp->Play();
EXPECT_TRUE(tvp->WaitForFlushDone());
EXPECT_EQ(tvp->GetFlushDoneCount(), 1u);
EXPECT_EQ(tvp->GetFrameDecodedCount(), g_env->Video()->NumFrames());
EXPECT_TRUE(tvp->WaitForFrameProcessors());
}
} // namespace test
} // namespace media
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment