
PeerConfigurerImpl is renamed to PeerConfigurer. Change-Id: Ie52c581126c21740536d42ff4831f0c4ed445ea4 Bug: webrtc:14627 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/281883 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Artem Titov <titovartem@webrtc.org> Commit-Queue: Jeremy Leconte <jleconte@google.com> Cr-Commit-Position: refs/heads/main@{#38603}
53 lines
1.6 KiB
C++
53 lines
1.6 KiB
C++
/*
|
|
* Copyright (c) 2022 The WebRTC project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
#ifndef TEST_PC_E2E_PEER_PARAMS_PREPROCESSOR_H_
|
|
#define TEST_PC_E2E_PEER_PARAMS_PREPROCESSOR_H_
|
|
|
|
#include <memory>
|
|
#include <set>
|
|
#include <string>
|
|
|
|
#include "api/test/pclf/peer_configurer.h"
|
|
|
|
namespace webrtc {
|
|
namespace webrtc_pc_e2e {
|
|
|
|
class PeerParamsPreprocessor {
|
|
public:
|
|
PeerParamsPreprocessor();
|
|
~PeerParamsPreprocessor();
|
|
|
|
// Set missing params to default values if it is required:
|
|
// * Generate video stream labels if some of them are missing
|
|
// * Generate audio stream labels if some of them are missing
|
|
// * Set video source generation mode if it is not specified
|
|
// * Video codecs under test
|
|
void SetDefaultValuesForMissingParams(PeerConfigurer& peer);
|
|
|
|
// Validate peer's parameters, also ensure uniqueness of all video stream
|
|
// labels.
|
|
void ValidateParams(const PeerConfigurer& peer);
|
|
|
|
private:
|
|
class DefaultNamesProvider;
|
|
std::unique_ptr<DefaultNamesProvider> peer_names_provider_;
|
|
|
|
std::set<std::string> peer_names_;
|
|
std::set<std::string> video_labels_;
|
|
std::set<std::string> audio_labels_;
|
|
std::set<std::string> video_sync_groups_;
|
|
std::set<std::string> audio_sync_groups_;
|
|
};
|
|
|
|
} // namespace webrtc_pc_e2e
|
|
} // namespace webrtc
|
|
|
|
#endif // TEST_PC_E2E_PEER_PARAMS_PREPROCESSOR_H_
|