1 /* 2 * Copyright (c) 2020 The WebRTC project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 #ifndef API_TEST_CREATE_PEER_CONNECTION_QUALITY_TEST_FRAME_GENERATOR_H_ 11 #define API_TEST_CREATE_PEER_CONNECTION_QUALITY_TEST_FRAME_GENERATOR_H_ 12 13 #include <memory> 14 #include <string> 15 16 #include "absl/types/optional.h" 17 #include "api/test/frame_generator_interface.h" 18 #include "api/test/peerconnection_quality_test_fixture.h" 19 20 namespace webrtc { 21 namespace webrtc_pc_e2e { 22 23 // Creates a frame generator that produces frames with small squares that move 24 // randomly towards the lower right corner. |type| has the default value 25 // FrameGeneratorInterface::OutputType::I420. video_config specifies frame 26 // weight and height. 27 std::unique_ptr<test::FrameGeneratorInterface> CreateSquareFrameGenerator( 28 const PeerConnectionE2EQualityTestFixture::VideoConfig& video_config, 29 absl::optional<test::FrameGeneratorInterface::OutputType> type); 30 31 // Creates a frame generator that plays frames from the yuv file. 32 std::unique_ptr<test::FrameGeneratorInterface> CreateFromYuvFileFrameGenerator( 33 const PeerConnectionE2EQualityTestFixture::VideoConfig& video_config, 34 std::string filename); 35 36 // Creates a proper frame generator for testing screen sharing. 37 std::unique_ptr<test::FrameGeneratorInterface> CreateScreenShareFrameGenerator( 38 const PeerConnectionE2EQualityTestFixture::VideoConfig& video_config, 39 const PeerConnectionE2EQualityTestFixture::ScreenShareConfig& 40 screen_share_config); 41 42 } // namespace webrtc_pc_e2e 43 } // namespace webrtc 44 45 #endif // API_TEST_CREATE_PEER_CONNECTION_QUALITY_TEST_FRAME_GENERATOR_H_ 46