#include "media/base/test_data_util.h"
#include "media/media_buildflags.h"
#include "media/test/pipeline_integration_test_base.h"
#include "testing/perf/perf_result_reporter.h"
namespace media {
static const int kBenchmarkIterationsAudio = …;
static const int kBenchmarkIterationsVideo = …;
static void RunPlaybackBenchmark(const std::string& filename,
const std::string& metric_suffix,
int iterations,
bool audio_only) { … }
static void RunVideoPlaybackBenchmark(const std::string& filename,
const std::string name) { … }
static void RunAudioPlaybackBenchmark(const std::string& filename,
const std::string& name) { … }
class ClocklessAudioPipelineIntegrationPerfTest
: public testing::TestWithParam<const char*> { … };
TEST_P(ClocklessAudioPipelineIntegrationPerfTest, PlaybackBenchmark) { … }
static const char* kAudioTestFiles[] { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST(PipelineIntegrationPerfTest, VP8PlaybackBenchmark) { … }
TEST(PipelineIntegrationPerfTest, VP9PlaybackBenchmark) { … }
#if BUILDFLAG(ENABLE_AV1_DECODER)
TEST(PipelineIntegrationPerfTest, AV1PlaybackBenchmark) { … }
#endif
#if BUILDFLAG(USE_PROPRIETARY_CODECS) && BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS)
TEST(PipelineIntegrationPerfTest, MP4PlaybackBenchmark) {
RunVideoPlaybackBenchmark("bear_silent.mp4", "_mp4");
}
#endif
}