// Copyright 2023 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifdef UNSAFE_BUFFERS_BUILD // TODO(crbug.com/40285824): Remove this and convert code to safer constructs. #pragma allow_unsafe_buffers #endif #include "media/gpu/frame_size_estimator.h" #include "media/gpu/h264_rate_control_util.h" #include "testing/gtest/include/gtest/gtest.h" namespace media { namespace { constexpr int kCommonFps = …; constexpr uint32_t kCommonAvgBitrate = …; // bits per second // Test FrameSizeEstimatorTest updates the estimator running the test frame // sequence and checks whether the expected output from the component is // generated. class FrameSizeEstimatorTest : public testing::Test { … }; // Test Cases // The test runs a predefined sequence of frame sizes two times and checks // the stats after running each sequence. Different window size is used in // each run. TEST_F(FrameSizeEstimatorTest, RunBasicFrameSizeEstimatorTest) { … } // The test updates the buffer with predefined sample sequence and checks the // estimated frame size values. TEST_F(FrameSizeEstimatorTest, CheckEstimatorStates) { … } } // namespace } // namespace media