#include "third_party/blink/renderer/modules/mediastream/video_track_adapter.h"
#include <limits>
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ptr.h"
#include "base/numerics/ranges.h"
#include "base/run_loop.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "base/threading/thread.h"
#include "base/time/time.h"
#include "media/base/limits.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/web/web_heap.h"
#include "third_party/blink/renderer/modules/mediastream/mock_encoded_video_frame.h"
#include "third_party/blink/renderer/modules/mediastream/mock_media_stream_video_source.h"
#include "third_party/blink/renderer/modules/mediastream/video_track_adapter_settings.h"
#include "third_party/blink/renderer/platform/testing/io_task_runner_testing_platform_support.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/testing/video_frame_utils.h"
#include "third_party/webrtc_overrides/low_precision_timer.h"
#include "third_party/webrtc_overrides/metronome_source.h"
namespace blink {
_;
AnyNumber;
NiceMock;
TEST(VideoTrackAdapterTest, ZeroInputArea) { … }
TEST(VideoTrackAdapterTest, ZeroOutputArea) { … }
TEST(VideoTrackAdapterTest, LargeFrames) { … }
TEST(VideoTrackAdapterTest, NoRescaling) { … }
class VideoTrackAdapterFixtureTest : public ::testing::Test { … };
TEST_F(VideoTrackAdapterFixtureTest, DeliverFrame_GpuMemoryBuffer) { … }
TEST_F(VideoTrackAdapterFixtureTest,
DeliversHWFrameVisibleRectWithEvenOriginAndWidth) { … }
TEST_F(VideoTrackAdapterFixtureTest,
DeliversSWFrameVisibleRectWithEvenOriginAndWidth) { … }
TEST_F(VideoTrackAdapterFixtureTest,
DeliversHWFrameVisibleRectWithEvenOriginAndHeight) { … }
TEST_F(VideoTrackAdapterFixtureTest,
DeliversSWFrameVisibleRectWithEvenOriginAndHeight) { … }
TEST_F(VideoTrackAdapterFixtureTest,
DeliversSWFrameOddVisibleRectWithEvenOriginAndHeight) { … }
TEST_F(VideoTrackAdapterFixtureTest,
DeliverPortraitFrame_RunSettingsCallbackForSecondTrack) { … }
TEST_F(VideoTrackAdapterFixtureTest, FrameRateReduction) { … }
TEST_F(VideoTrackAdapterFixtureTest, ArbitraryFrameRateReduction) { … }
TEST_F(VideoTrackAdapterFixtureTest, StreamWithJitterFrameRateReduction) { … }
TEST_F(VideoTrackAdapterFixtureTest, DoNotDropFramesIfFrameRatesMatch) { … }
TEST_F(VideoTrackAdapterFixtureTest, FrameRateReductionSlightMismatch) { … }
TEST_F(VideoTrackAdapterFixtureTest, DoNotDropFramesIfNoTargetFrameRate) { … }
TEST_F(VideoTrackAdapterFixtureTest, DropFramesIfTargetFrameRateIsInfinite) { … }
TEST_F(VideoTrackAdapterFixtureTest,
DoNotDropFramesIfTimeBetweenFramesIsNegative) { … }
TEST_F(VideoTrackAdapterFixtureTest,
DoNotDropFramesIfTimeBetweenFramesIsTooLong) { … }
TEST_F(VideoTrackAdapterFixtureTest, DropFramesIfTimeBetweenFramesIsTooShort) { … }
TEST_F(VideoTrackAdapterFixtureTest, DropFramesIfTimeBetweenFramesIsZero) { … }
class VideoTrackAdapterEncodedTest : public ::testing::Test { … };
TEST_F(VideoTrackAdapterEncodedTest, DeliverEncodedVideoFrame) { … }
}