#include <stdint.h>
#include <string.h>
#include <cstring>
#include <memory>
#include <string>
#include "base/check.h"
#include "base/command_line.h"
#include "base/containers/queue.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 "media/gpu/h264_decoder.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
_;
Args;
Expectation;
InSequence;
MakeMatcher;
Matcher;
MatcherInterface;
MatchResultListener;
Mock;
Return;
namespace media {
namespace {
const std::string kBaselineFrame0 = …;
const std::string kBaselineFrame1 = …;
const std::string kBaselineFrame2 = …;
const std::string kBaselineFrame3 = …;
const std::string kHighFrame0 = …;
const std::string kHighFrame1 = …;
const std::string kHighFrame2 = …;
const std::string kHighFrame3 = …;
const std::string k10BitFrame0 = …;
const std::string k10BitFrame1 = …;
const std::string k10BitFrame2 = …;
const std::string k10BitFrame3 = …;
const std::string kYUV444Frame = …;
MATCHER_P(DecryptConfigMatches, decrypt_config, "") { … }
MATCHER(SubsampleSizeMatches, "Verify subsample sizes match buffer size") { … }
H264Decoder::H264Accelerator::Status ParseSliceHeader(
const std::vector<base::span<const uint8_t>>& data,
const std::vector<SubsampleEntry>& subsamples,
const std::vector<uint8_t>& sps_nalu_data,
const std::vector<uint8_t>& pps_nalu_data,
H264SliceHeader* slice_hdr_out) { … }
class MockH264Accelerator : public H264Decoder::H264Accelerator { … };
class H264DecoderTest : public ::testing::Test { … };
void H264DecoderTest::SetUp() { … }
void H264DecoderTest::SetInputFrameFiles(
const std::vector<std::string>& input_frame_files) { … }
AcceleratedVideoDecoder::DecodeResult H264DecoderTest::Decode(
bool full_sample_encryption) { … }
class WithPocMatcher : public MatcherInterface<scoped_refptr<H264Picture>> { … };
inline Matcher<scoped_refptr<H264Picture>> WithPoc(int expected_poc) { … }
TEST_F(H264DecoderTest, DecodeSingleFrame) { … }
TEST_F(H264DecoderTest, DecodeSingleEncryptedFrame) { … }
TEST_F(H264DecoderTest, SkipNonIDRFrames) { … }
TEST_F(H264DecoderTest, DecodeProfileBaseline) { … }
TEST_F(H264DecoderTest, Decode10BitStream) { … }
TEST_F(H264DecoderTest, OutputPictureFailureCausesDecodeToFail) { … }
TEST_F(H264DecoderTest, DecodeProfileHigh) { … }
TEST_F(H264DecoderTest, DenyDecodeNonYUV420) { … }
TEST_F(H264DecoderTest, SwitchBaselineToHigh) { … }
TEST_F(H264DecoderTest, SwitchHighToBaseline) { … }
TEST_F(H264DecoderTest, SwitchYUV420ToNonYUV420) { … }
TEST_F(H264DecoderTest, SetEncryptedStream) { … }
TEST_F(H264DecoderTest, ParseEncryptedSliceHeaderRetry) { … }
TEST_F(H264DecoderTest, SubmitFrameMetadataRetry) { … }
TEST_F(H264DecoderTest, SubmitSliceRetry) { … }
TEST_F(H264DecoderTest, SubmitDecodeRetry) { … }
TEST_F(H264DecoderTest, SetStreamRetry) { … }
}
}