1 /* 2 * Copyright (c) 2022 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 TEST_PC_E2E_PEER_PARAMS_PREPROCESSOR_H_ 11 #define TEST_PC_E2E_PEER_PARAMS_PREPROCESSOR_H_ 12 13 #include <memory> 14 #include <set> 15 #include <string> 16 17 #include "api/test/pclf/peer_configurer.h" 18 19 namespace webrtc { 20 namespace webrtc_pc_e2e { 21 22 class PeerParamsPreprocessor { 23 public: 24 PeerParamsPreprocessor(); 25 ~PeerParamsPreprocessor(); 26 27 // Set missing params to default values if it is required: 28 // * Generate video stream labels if some of them are missing 29 // * Generate audio stream labels if some of them are missing 30 // * Set video source generation mode if it is not specified 31 // * Video codecs under test 32 void SetDefaultValuesForMissingParams(PeerConfigurer& peer); 33 34 // Validate peer's parameters, also ensure uniqueness of all video stream 35 // labels. 36 void ValidateParams(const PeerConfigurer& peer); 37 38 private: 39 class DefaultNamesProvider; 40 std::unique_ptr<DefaultNamesProvider> peer_names_provider_; 41 42 std::set<std::string> peer_names_; 43 std::set<std::string> video_labels_; 44 std::set<std::string> audio_labels_; 45 std::set<std::string> video_sync_groups_; 46 std::set<std::string> audio_sync_groups_; 47 }; 48 49 } // namespace webrtc_pc_e2e 50 } // namespace webrtc 51 52 #endif // TEST_PC_E2E_PEER_PARAMS_PREPROCESSOR_H_ 53