/* * Copyright (c) 2019 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.
*/
// Describes a single participant in the call. class TestPeer final : public StatsProvider { public:
~TestPeer() override = default;
const Params& params() const { return params_; }
ConfigurableParams configurable_params() const; void AddVideoConfig(VideoConfig config); // Removes video config with specified name. Crashes if the config with // specified name isn't found. void RemoveVideoConfig(absl::string_view stream_label); void SetVideoSubscription(VideoSubscription subscription);
// Tell underlying `PeerConnection` to create an Offer. // `observer` will be invoked on the signaling thread when offer is created. void CreateOffer(
rtc::scoped_refptr<CreateSessionDescriptionObserver> observer) {
RTC_CHECK(wrapper_) << "TestPeer is already closed";
pc()->CreateOffer(observer.get(), params_.rtc_offer_answer_options);
}
std::unique_ptr<SessionDescriptionInterface> CreateOffer() {
RTC_CHECK(wrapper_) << "TestPeer is already closed"; return wrapper_->CreateOffer(params_.rtc_offer_answer_options);
}
// `error_out` will be set only if returned value is false. bool SetRemoteDescription(std::unique_ptr<SessionDescriptionInterface> desc,
std::string* error_out = nullptr);
// Safety flag to protect all tasks posted on the signaling thread to not be // executed after `wrapper_` object is destructed.
rtc::scoped_refptr<PendingTaskSafetyFlag> signaling_thread_task_safety_ =
nullptr;
// Keeps ownership of worker thread. It has to be destroyed after `wrapper_`. // `worker_thread_`can be null if the Peer use only one thread as both the // worker thread and network thread.
std::unique_ptr<rtc::Thread> worker_thread_;
std::unique_ptr<PeerConnectionWrapper> wrapper_;
std::vector<PeerConfigurer::VideoSource> video_sources_;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.