#include <utility>
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "media/base/limits.h"
#include "media/base/video_frame.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/mediastream/media_stream.mojom-blink.h"
#include "third_party/blink/public/web/modules/mediastream/media_stream_video_source.h"
#include "third_party/blink/public/web/web_heap.h"
#include "third_party/blink/renderer/modules/mediastream/media_stream_video_track.h"
#include "third_party/blink/renderer/modules/mediastream/mock_constraint_factory.h"
#include "third_party/blink/renderer/modules/mediastream/mock_media_stream_video_sink.h"
#include "third_party/blink/renderer/modules/mediastream/mock_media_stream_video_source.h"
#include "third_party/blink/renderer/modules/mediastream/video_track_adapter.h"
#include "third_party/blink/renderer/modules/mediastream/video_track_adapter_settings.h"
#include "third_party/blink/renderer/platform/mediastream/media_stream_source.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/wtf/functional.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
_;
DoAll;
InSequence;
Mock;
Return;
SaveArg;
namespace blink {
const double kSourceFrameRate = …;
class MediaStreamVideoSourceTest : public testing::Test { … };
TEST_F(MediaStreamVideoSourceTest, AddTrackAndStartSource) { … }
TEST_F(MediaStreamVideoSourceTest, AddTwoTracksBeforeSourceStarts) { … }
TEST_F(MediaStreamVideoSourceTest, AddTrackAfterSourceStarts) { … }
TEST_F(MediaStreamVideoSourceTest, AddTrackAndFailToStartSource) { … }
TEST_F(MediaStreamVideoSourceTest, MandatoryAspectRatio4To3) { … }
TEST_F(MediaStreamVideoSourceTest, ReleaseTrackAndSourceOnSuccessCallBack) { … }
TEST_F(MediaStreamVideoSourceTest, TwoTracksWithVGAAndWVGA) { … }
TEST_F(MediaStreamVideoSourceTest, TwoTracksWith720AndWVGA) { … }
TEST_F(MediaStreamVideoSourceTest, SourceChangeFrameSize) { … }
TEST_F(MediaStreamVideoSourceTest, RotatedSourceDetectionDisabled) { … }
TEST_F(MediaStreamVideoSourceTest, RotatedSourceDetectionEnabled) { … }
TEST_F(MediaStreamVideoSourceTest, MutedSource) { … }
TEST_F(MediaStreamVideoSourceTest,
SendAtMaxRateAndExpectAllFramesToBeDelivered) { … }
TEST_F(MediaStreamVideoSourceTest, NotifyFrameDroppedWhenStartAtTooHighRate) { … }
TEST_F(MediaStreamVideoSourceTest, ForwardsAtMaxFrameRateAndDropsWhenTooClose) { … }
TEST_F(MediaStreamVideoSourceTest, DropFrameAtTooHighRateAndThenStopDropping) { … }
TEST_F(MediaStreamVideoSourceTest, ReconfigureTrack) { … }
TEST_F(MediaStreamVideoSourceTest, ReconfigureStoppedTrack) { … }
TEST_F(MediaStreamVideoSourceTest, FailedRestart) { … }
TEST_F(MediaStreamVideoSourceTest, SuccessfulRestart) { … }
TEST_F(MediaStreamVideoSourceTest, FailedRestartAfterStopForRestart) { … }
TEST_F(MediaStreamVideoSourceTest, StartStopAndNotifyRestartSupported) { … }
TEST_F(MediaStreamVideoSourceTest, StartStopAndNotifyRestartNotSupported) { … }
TEST_F(MediaStreamVideoSourceTest, StopSuspendedTrack) { … }
TEST_F(MediaStreamVideoSourceTest, AddTrackAfterStoppingSource) { … }
TEST_F(MediaStreamVideoSourceTest, AddsEncodedSinkWhenEncodedConsumerAppears) { … }
TEST_F(MediaStreamVideoSourceTest, AddsEncodedSinkWhenEncodedConsumersAppear) { … }
TEST_F(MediaStreamVideoSourceTest,
RemovesEncodedSinkWhenEncodedConsumerDisappears) { … }
TEST_F(MediaStreamVideoSourceTest,
RemovesEncodedSinkWhenEncodedConsumersDisappear) { … }
TEST_F(MediaStreamVideoSourceTest, RemovesEncodedSinkWhenTrackStops) { … }
TEST_F(MediaStreamVideoSourceTest, CapturingLinkSecureOnlyEncodedSinks) { … }
TEST_F(MediaStreamVideoSourceTest, CapturingLinkSecureTracksAndEncodedSinks) { … }
TEST_F(MediaStreamVideoSourceTest, CanDiscardAlpha) { … }
TEST_F(MediaStreamVideoSourceTest, CanDiscardAlphaIfOtherSinksDiscard) { … }
TEST_F(MediaStreamVideoSourceTest, CanDiscardAlphaMultipleTracks) { … }
TEST_F(MediaStreamVideoSourceTest, ConfiguredFrameRate) { … }
}