chromium/media/gpu/vp8_decoder_unittest.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "media/gpu/vp8_decoder.h"

#include <stdint.h>

#include <string>

#include "base/command_line.h"
#include "base/containers/span.h"
#include "base/files/file_util.h"
#include "base/memory/raw_ptr.h"
#include "media/base/test_data_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

_;
InSequence;
Invoke;
Mock;
Return;

namespace media {
namespace {

const std::string kNullFrame =;
const std::string kIFrame =;
const std::string kPFrame =;
const std::string kCorruptFrame =;
constexpr gfx::Size kVideoSize(320, 240);
constexpr size_t kRequiredNumOfPictures =;

class MockVP8Accelerator : public VP8Decoder::VP8Accelerator {};

// Test VP8Decoder by feeding different VP8 frame sequences and making sure it
// behaves as expected.
class VP8DecoderTest : public ::testing::Test {};

void VP8DecoderTest::SetUp() {}

void VP8DecoderTest::DecodeFirstIFrame() {}

// DecodeFirstIFrame() allocates new surfaces so VP8Decoder::Decode() must be
// called again to complete to decode the first frame.
void VP8DecoderTest::CompleteToDecodeFirstIFrame() {}

AcceleratedVideoDecoder::DecodeResult VP8DecoderTest::Decode(
    std::string input_frame_file) {}

// Test Cases

TEST_F(VP8DecoderTest, DecodeSingleFrame) {}

TEST_F(VP8DecoderTest, FailCreatePicture) {}

TEST_F(VP8DecoderTest, DecodeCorruptFrame) {}

TEST_F(VP8DecoderTest, DecodeIAndPFrames) {}

TEST_F(VP8DecoderTest, DecodeIandMultiplePFrames) {}

TEST_F(VP8DecoderTest, DecodeMultipleIAndPFrames) {}

TEST_F(VP8DecoderTest, HaveSkippedFrames) {}

// Verify that |decoder_| returns kDecodeError if too many kPFrames are received
// while expecting a kIFrame.
TEST_F(VP8DecoderTest, HaveSkippedFramesAtMaxNumOfSizeChangeFailures) {}

// Verify that new kIFrame recovers |decoder_| to decode the frame when the
// previous I frame is missing.
TEST_F(VP8DecoderTest, RecoverFromSkippedFrames) {}

}  // namespace
}  // namespace media