mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 05:40:42 +01:00
Revert "Reland "Replace sigslot usages with robocaller library.""
This reverts commitc5f7108758
. Reason for revert: Causes Chromium WPT Tests to fail, preventing rolls. Sample failed run: https://ci.chromium.org/p/chromium/builders/try/linux-rel/511995? Sample logs: STDERR: # Fatal error in: ../../third_party/webrtc/pc/peer_connection.cc, line 575 STDERR: # last system error: 0 STDERR: # Check failed: (signaling_thread())->IsCurrent() STDERR: # Received signal 6 STDERR: #0 0x7f81d39e3de9 base::debug::CollectStackTrace() STDERR: #1 0x7f81d38f9ca3 base::debug::StackTrace::StackTrace() STDERR: #2 0x7f81d39e393b base::debug::(anonymous namespace)::StackDumpSignalHandler() STDERR: #3 0x7f81c9054140 (/lib/x86_64-linux-gnu/libpthread-2.31.so+0x1413f) STDERR: #4 0x7f81c8d72db1 gsignal STDERR: #5 0x7f81c8d5c537 abort STDERR: #6 0x7f81c7344032 rtc::webrtc_checks_impl::FatalLog() STDERR: #7 0x7f81c722e5c0 webrtc::webrtc_function_impl::CallHelpers<>::CallInlineStorage<>() STDERR: #8 0x7f81c7348d99 webrtc::robo_caller_impl::RoboCallerReceivers::Foreach() STDERR: #9 0x7f81c72d6e8e webrtc::webrtc_function_impl::CallHelpers<>::CallInlineStorage<>() STDERR: #10 0x7f81c7348d99 webrtc::robo_caller_impl::RoboCallerReceivers::Foreach() STDERR: #11 0x7f81c71c6df3 webrtc::webrtc_function_impl::CallHelpers<>::CallInlineStorage<>() STDERR: #12 0x7f81c7348d99 webrtc::robo_caller_impl::RoboCallerReceivers::Foreach() STDERR: #13 0x7f81c73135bc rtc::OpenSSLStreamAdapter::ContinueSSL() STDERR: #14 0x7f81c7312fd4 rtc::OpenSSLStreamAdapter::OnEvent() STDERR: #15 0x7f81c71c30d9 cricket::StreamInterfaceChannel::OnPacketReceived() STDERR: #16 0x7f81c71c640a cricket::DtlsTransport::OnReadPacket() STDERR: #17 0x7f81c71cad61 cricket::P2PTransportChannel::OnReadPacket() STDERR: #18 0x7f81c71bc90f cricket::Connection::OnReadPacket() STDERR: #19 0x7f81c71e6255 cricket::UDPPort::HandleIncomingPacket() STDERR: #20 0x7f81cd1f1bff blink::(anonymous namespace)::IpcPacketSocket::OnDataReceived() STDERR: #21 0x7f81cd1f645d blink::P2PSocketClientImpl::DataReceived() STDERR: #22 0x7f81cd50a16b network::mojom::blink::P2PSocketClientStubDispatch::Accept() STDERR: #23 0x7f81d2b4f642 mojo::InterfaceEndpointClient::HandleValidatedMessage() STDERR: #24 0x7f81d2b5304b mojo::MessageDispatcher::Accept() STDERR: #25 0x7f81d2b50bb1 mojo::InterfaceEndpointClient::HandleIncomingMessage() STDERR: #26 0x7f81d2b58a3a mojo::internal::MultiplexRouter::ProcessIncomingMessage() STDERR: #27 0x7f81d2b57f7f mojo::internal::MultiplexRouter::Accept() STDERR: #28 0x7f81d2b5304b mojo::MessageDispatcher::Accept() STDERR: #29 0x7f81d2b48851 mojo::Connector::DispatchMessage() STDERR: #30 0x7f81d2b492e7 mojo::Connector::ReadAllAvailableMessages() STDERR: #31 0x7f81d2b490a3 mojo::Connector::OnHandleReadyInternal() STDERR: #32 0x7f81d2b498f0 mojo::SimpleWatcher::DiscardReadyState() STDERR: #33 0x7f81d2d0e67a mojo::SimpleWatcher::OnHandleReady() STDERR: #34 0x7f81d2d0eb2b base::internal::Invoker<>::RunOnce() STDERR: #35 0x7f81d397f85b base::TaskAnnotator::RunTask() STDERR: #36 0x7f81d399a04c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl() STDERR: #37 0x7f81d3999c78 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() STDERR: #38 0x7f81d391fe64 base::MessagePumpDefault::Run() STDERR: #39 0x7f81d399a8dc base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run() STDERR: #40 0x7f81d395ae55 base::RunLoop::Run() STDERR: #41 0x7f81d39c87f2 base::Thread::Run() Original change's description: > Reland "Replace sigslot usages with robocaller library." > > This is a reland of40261c3663
> > Note: Instead of changing the type of JsepTransportController->SignalSSLHandshakeError > added a new member with a different name and used it in webrtc code. > After this change do two more follow up CLs to completely remove the old code > from google3. > > Original change's description: > > Replace sigslot usages with robocaller library. > > > > - Replace all the top level signals from jsep_transport_controller. > > - There are still sigslot usages in this file so keep the inheritance > > and that is the reason for not having a binary size gain in this CL. > > > > Bug: webrtc:11943 > > Change-Id: I249d3b9710783aef70ba273e082ceeafe3056898 > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185540 > > Commit-Queue: Lahiru Ginnaliya Gamathige <glahiru@webrtc.org> > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> > > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#32321} > > Bug: webrtc:11943 > Change-Id: Ia07394ee395f94836f6b576c3a97d119a7678e1a > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186946 > Commit-Queue: Lahiru Ginnaliya Gamathige <glahiru@webrtc.org> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#32359} TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,glahiru@webrtc.org Change-Id: I6bce1775d10758ac4a9d05b855f473dd70bd9815 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:11943 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187487 Reviewed-by: Guido Urdaneta <guidou@webrtc.org> Commit-Queue: Guido Urdaneta <guidou@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32372}
This commit is contained in:
parent
c05e9a0f89
commit
ff7913204c
11 changed files with 55 additions and 105 deletions
|
@ -97,7 +97,6 @@ rtc_library("rtc_p2p") {
|
||||||
"../logging:ice_log",
|
"../logging:ice_log",
|
||||||
"../rtc_base",
|
"../rtc_base",
|
||||||
"../rtc_base:checks",
|
"../rtc_base:checks",
|
||||||
"../rtc_base:robo_caller",
|
|
||||||
"../rtc_base:rtc_numerics",
|
"../rtc_base:rtc_numerics",
|
||||||
"../rtc_base/experiments:field_trial_parser",
|
"../rtc_base/experiments:field_trial_parser",
|
||||||
"../rtc_base/synchronization:sequence_checker",
|
"../rtc_base/synchronization:sequence_checker",
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
#include "rtc_base/dscp.h"
|
#include "rtc_base/dscp.h"
|
||||||
#include "rtc_base/logging.h"
|
#include "rtc_base/logging.h"
|
||||||
#include "rtc_base/robo_caller.h"
|
|
||||||
#include "rtc_base/rtc_certificate.h"
|
#include "rtc_base/rtc_certificate.h"
|
||||||
#include "rtc_base/ssl_stream_adapter.h"
|
#include "rtc_base/ssl_stream_adapter.h"
|
||||||
#include "rtc_base/stream.h"
|
#include "rtc_base/stream.h"
|
||||||
|
@ -359,8 +358,8 @@ bool DtlsTransport::SetupDtls() {
|
||||||
dtls_->SetMaxProtocolVersion(ssl_max_version_);
|
dtls_->SetMaxProtocolVersion(ssl_max_version_);
|
||||||
dtls_->SetServerRole(*dtls_role_);
|
dtls_->SetServerRole(*dtls_role_);
|
||||||
dtls_->SignalEvent.connect(this, &DtlsTransport::OnDtlsEvent);
|
dtls_->SignalEvent.connect(this, &DtlsTransport::OnDtlsEvent);
|
||||||
dtls_->SSLHandshakeErrorSignal.AddReceiver(
|
dtls_->SignalSSLHandshakeError.connect(this,
|
||||||
[this](rtc::SSLHandshakeError e) { OnDtlsHandshakeError(e); });
|
&DtlsTransport::OnDtlsHandshakeError);
|
||||||
if (remote_fingerprint_value_.size() &&
|
if (remote_fingerprint_value_.size() &&
|
||||||
!dtls_->SetPeerCertificateDigest(
|
!dtls_->SetPeerCertificateDigest(
|
||||||
remote_fingerprint_algorithm_,
|
remote_fingerprint_algorithm_,
|
||||||
|
@ -822,7 +821,6 @@ void DtlsTransport::set_dtls_state(DtlsTransportState state) {
|
||||||
|
|
||||||
void DtlsTransport::OnDtlsHandshakeError(rtc::SSLHandshakeError error) {
|
void DtlsTransport::OnDtlsHandshakeError(rtc::SSLHandshakeError error) {
|
||||||
SignalDtlsHandshakeError(error);
|
SignalDtlsHandshakeError(error);
|
||||||
DtlsHandshakeErrorSignal.Send(error);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DtlsTransport::ConfigureHandshakeTimeout() {
|
void DtlsTransport::ConfigureHandshakeTimeout() {
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#include "p2p/base/ice_transport_internal.h"
|
#include "p2p/base/ice_transport_internal.h"
|
||||||
#include "p2p/base/packet_transport_internal.h"
|
#include "p2p/base/packet_transport_internal.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
#include "rtc_base/constructor_magic.h"
|
||||||
#include "rtc_base/robo_caller.h"
|
|
||||||
#include "rtc_base/ssl_certificate.h"
|
#include "rtc_base/ssl_certificate.h"
|
||||||
#include "rtc_base/ssl_fingerprint.h"
|
#include "rtc_base/ssl_fingerprint.h"
|
||||||
#include "rtc_base/ssl_stream_adapter.h"
|
#include "rtc_base/ssl_stream_adapter.h"
|
||||||
|
@ -116,9 +115,7 @@ class DtlsTransportInternal : public rtc::PacketTransportInternal {
|
||||||
sigslot::signal2<DtlsTransportInternal*, DtlsTransportState> SignalDtlsState;
|
sigslot::signal2<DtlsTransportInternal*, DtlsTransportState> SignalDtlsState;
|
||||||
|
|
||||||
// Emitted whenever the Dtls handshake failed on some transport channel.
|
// Emitted whenever the Dtls handshake failed on some transport channel.
|
||||||
// TODO(bugs.webrtc.org/11943): Remove sigslot and use one variable.
|
|
||||||
sigslot::signal1<rtc::SSLHandshakeError> SignalDtlsHandshakeError;
|
sigslot::signal1<rtc::SSLHandshakeError> SignalDtlsHandshakeError;
|
||||||
webrtc::RoboCaller<rtc::SSLHandshakeError> DtlsHandshakeErrorSignal;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
DtlsTransportInternal();
|
DtlsTransportInternal();
|
||||||
|
|
|
@ -462,8 +462,8 @@ JsepTransportController::CreateDtlsTransport(
|
||||||
this, &JsepTransportController::OnTransportWritableState_n);
|
this, &JsepTransportController::OnTransportWritableState_n);
|
||||||
dtls->SignalReceivingState.connect(
|
dtls->SignalReceivingState.connect(
|
||||||
this, &JsepTransportController::OnTransportReceivingState_n);
|
this, &JsepTransportController::OnTransportReceivingState_n);
|
||||||
dtls->DtlsHandshakeErrorSignal.AddReceiver(
|
dtls->SignalDtlsHandshakeError.connect(
|
||||||
[this](rtc::SSLHandshakeError error) { OnDtlsHandshakeError(error); });
|
this, &JsepTransportController::OnDtlsHandshakeError);
|
||||||
dtls->ice_transport()->SignalGatheringState.connect(
|
dtls->ice_transport()->SignalGatheringState.connect(
|
||||||
this, &JsepTransportController::OnTransportGatheringState_n);
|
this, &JsepTransportController::OnTransportGatheringState_n);
|
||||||
dtls->ice_transport()->SignalCandidateGathered.connect(
|
dtls->ice_transport()->SignalCandidateGathered.connect(
|
||||||
|
@ -1154,8 +1154,7 @@ void JsepTransportController::OnTransportCandidateGathered_n(
|
||||||
std::string transport_name = transport->transport_name();
|
std::string transport_name = transport->transport_name();
|
||||||
invoker_.AsyncInvoke<void>(
|
invoker_.AsyncInvoke<void>(
|
||||||
RTC_FROM_HERE, signaling_thread_, [this, transport_name, candidate] {
|
RTC_FROM_HERE, signaling_thread_, [this, transport_name, candidate] {
|
||||||
SignalIceCandidatesGathered.Send(
|
SignalIceCandidatesGathered(transport_name, {candidate});
|
||||||
transport_name, std::vector<cricket::Candidate>{candidate});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1164,21 +1163,20 @@ void JsepTransportController::OnTransportCandidateError_n(
|
||||||
const cricket::IceCandidateErrorEvent& event) {
|
const cricket::IceCandidateErrorEvent& event) {
|
||||||
RTC_DCHECK(network_thread_->IsCurrent());
|
RTC_DCHECK(network_thread_->IsCurrent());
|
||||||
|
|
||||||
invoker_.AsyncInvoke<void>(RTC_FROM_HERE, signaling_thread_, [this, event] {
|
invoker_.AsyncInvoke<void>(RTC_FROM_HERE, signaling_thread_,
|
||||||
SignalIceCandidateError.Send(event);
|
[this, event] { SignalIceCandidateError(event); });
|
||||||
});
|
|
||||||
}
|
}
|
||||||
void JsepTransportController::OnTransportCandidatesRemoved_n(
|
void JsepTransportController::OnTransportCandidatesRemoved_n(
|
||||||
cricket::IceTransportInternal* transport,
|
cricket::IceTransportInternal* transport,
|
||||||
const cricket::Candidates& candidates) {
|
const cricket::Candidates& candidates) {
|
||||||
invoker_.AsyncInvoke<void>(
|
invoker_.AsyncInvoke<void>(
|
||||||
RTC_FROM_HERE, signaling_thread_,
|
RTC_FROM_HERE, signaling_thread_,
|
||||||
[this, candidates] { SignalIceCandidatesRemoved.Send(candidates); });
|
[this, candidates] { SignalIceCandidatesRemoved(candidates); });
|
||||||
}
|
}
|
||||||
void JsepTransportController::OnTransportCandidatePairChanged_n(
|
void JsepTransportController::OnTransportCandidatePairChanged_n(
|
||||||
const cricket::CandidatePairChangeEvent& event) {
|
const cricket::CandidatePairChangeEvent& event) {
|
||||||
invoker_.AsyncInvoke<void>(RTC_FROM_HERE, signaling_thread_, [this, event] {
|
invoker_.AsyncInvoke<void>(RTC_FROM_HERE, signaling_thread_, [this, event] {
|
||||||
SignalIceCandidatePairChanged.Send(event);
|
SignalIceCandidatePairChanged(event);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1319,14 +1317,14 @@ void JsepTransportController::UpdateAggregateStates_n() {
|
||||||
PeerConnectionInterface::kIceConnectionCompleted) {
|
PeerConnectionInterface::kIceConnectionCompleted) {
|
||||||
// Ensure that we never skip over the "connected" state.
|
// Ensure that we never skip over the "connected" state.
|
||||||
invoker_.AsyncInvoke<void>(RTC_FROM_HERE, signaling_thread_, [this] {
|
invoker_.AsyncInvoke<void>(RTC_FROM_HERE, signaling_thread_, [this] {
|
||||||
SignalStandardizedIceConnectionState.Send(
|
SignalStandardizedIceConnectionState(
|
||||||
PeerConnectionInterface::kIceConnectionConnected);
|
PeerConnectionInterface::kIceConnectionConnected);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
standardized_ice_connection_state_ = new_ice_connection_state;
|
standardized_ice_connection_state_ = new_ice_connection_state;
|
||||||
invoker_.AsyncInvoke<void>(
|
invoker_.AsyncInvoke<void>(
|
||||||
RTC_FROM_HERE, signaling_thread_, [this, new_ice_connection_state] {
|
RTC_FROM_HERE, signaling_thread_, [this, new_ice_connection_state] {
|
||||||
SignalStandardizedIceConnectionState.Send(new_ice_connection_state);
|
SignalStandardizedIceConnectionState(new_ice_connection_state);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1380,7 +1378,7 @@ void JsepTransportController::UpdateAggregateStates_n() {
|
||||||
combined_connection_state_ = new_combined_state;
|
combined_connection_state_ = new_combined_state;
|
||||||
invoker_.AsyncInvoke<void>(RTC_FROM_HERE, signaling_thread_,
|
invoker_.AsyncInvoke<void>(RTC_FROM_HERE, signaling_thread_,
|
||||||
[this, new_combined_state] {
|
[this, new_combined_state] {
|
||||||
SignalConnectionState.Send(new_combined_state);
|
SignalConnectionState(new_combined_state);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1394,10 +1392,10 @@ void JsepTransportController::UpdateAggregateStates_n() {
|
||||||
}
|
}
|
||||||
if (ice_gathering_state_ != new_gathering_state) {
|
if (ice_gathering_state_ != new_gathering_state) {
|
||||||
ice_gathering_state_ = new_gathering_state;
|
ice_gathering_state_ = new_gathering_state;
|
||||||
invoker_.AsyncInvoke<void>(
|
invoker_.AsyncInvoke<void>(RTC_FROM_HERE, signaling_thread_,
|
||||||
RTC_FROM_HERE, signaling_thread_, [this, new_gathering_state] {
|
[this, new_gathering_state] {
|
||||||
SignalIceGatheringState.Send(new_gathering_state);
|
SignalIceGatheringState(new_gathering_state);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1410,7 +1408,7 @@ void JsepTransportController::OnRtcpPacketReceived_n(
|
||||||
|
|
||||||
void JsepTransportController::OnDtlsHandshakeError(
|
void JsepTransportController::OnDtlsHandshakeError(
|
||||||
rtc::SSLHandshakeError error) {
|
rtc::SSLHandshakeError error) {
|
||||||
SignalDtlsHandshakeError.Send(error);
|
SignalDtlsHandshakeError(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|
|
@ -200,29 +200,31 @@ class JsepTransportController : public sigslot::has_slots<> {
|
||||||
// Else => connecting
|
// Else => connecting
|
||||||
RoboCaller<cricket::IceConnectionState> SignalIceConnectionState;
|
RoboCaller<cricket::IceConnectionState> SignalIceConnectionState;
|
||||||
|
|
||||||
RoboCaller<PeerConnectionInterface::PeerConnectionState>
|
sigslot::signal1<PeerConnectionInterface::PeerConnectionState>
|
||||||
SignalConnectionState;
|
SignalConnectionState;
|
||||||
|
|
||||||
RoboCaller<PeerConnectionInterface::IceConnectionState>
|
sigslot::signal1<PeerConnectionInterface::IceConnectionState>
|
||||||
SignalStandardizedIceConnectionState;
|
SignalStandardizedIceConnectionState;
|
||||||
|
|
||||||
// If all transports done gathering => complete,
|
// If all transports done gathering => complete,
|
||||||
// Else if any are gathering => gathering,
|
// Else if any are gathering => gathering,
|
||||||
// Else => new
|
// Else => new
|
||||||
RoboCaller<cricket::IceGatheringState> SignalIceGatheringState;
|
sigslot::signal1<cricket::IceGatheringState> SignalIceGatheringState;
|
||||||
|
|
||||||
// [mid, candidates]
|
// (mid, candidates)
|
||||||
RoboCaller<const std::string&, const std::vector<cricket::Candidate>&>
|
sigslot::signal2<const std::string&, const std::vector<cricket::Candidate>&>
|
||||||
SignalIceCandidatesGathered;
|
SignalIceCandidatesGathered;
|
||||||
|
|
||||||
RoboCaller<const cricket::IceCandidateErrorEvent&> SignalIceCandidateError;
|
sigslot::signal1<const cricket::IceCandidateErrorEvent&>
|
||||||
|
SignalIceCandidateError;
|
||||||
|
|
||||||
RoboCaller<const std::vector<cricket::Candidate>&> SignalIceCandidatesRemoved;
|
sigslot::signal1<const std::vector<cricket::Candidate>&>
|
||||||
|
SignalIceCandidatesRemoved;
|
||||||
|
|
||||||
RoboCaller<const cricket::CandidatePairChangeEvent&>
|
sigslot::signal1<const cricket::CandidatePairChangeEvent&>
|
||||||
SignalIceCandidatePairChanged;
|
SignalIceCandidatePairChanged;
|
||||||
|
|
||||||
RoboCaller<rtc::SSLHandshakeError> SignalDtlsHandshakeError;
|
sigslot::signal1<rtc::SSLHandshakeError> SignalDtlsHandshakeError;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RTCError ApplyDescription_n(bool local,
|
RTCError ApplyDescription_n(bool local,
|
||||||
|
|
|
@ -93,24 +93,14 @@ class JsepTransportControllerTest : public JsepTransportController::Observer,
|
||||||
[this](cricket::IceConnectionState s) {
|
[this](cricket::IceConnectionState s) {
|
||||||
JsepTransportControllerTest::OnConnectionState(s);
|
JsepTransportControllerTest::OnConnectionState(s);
|
||||||
});
|
});
|
||||||
transport_controller_->SignalConnectionState.AddReceiver(
|
transport_controller_->SignalStandardizedIceConnectionState.connect(
|
||||||
[this](PeerConnectionInterface::PeerConnectionState s) {
|
this, &JsepTransportControllerTest::OnStandardizedIceConnectionState);
|
||||||
JsepTransportControllerTest::OnCombinedConnectionState(s);
|
transport_controller_->SignalConnectionState.connect(
|
||||||
});
|
this, &JsepTransportControllerTest::OnCombinedConnectionState);
|
||||||
transport_controller_->SignalStandardizedIceConnectionState.AddReceiver(
|
transport_controller_->SignalIceGatheringState.connect(
|
||||||
[this](PeerConnectionInterface::IceConnectionState s) {
|
this, &JsepTransportControllerTest::OnGatheringState);
|
||||||
JsepTransportControllerTest::OnStandardizedIceConnectionState(s);
|
transport_controller_->SignalIceCandidatesGathered.connect(
|
||||||
});
|
this, &JsepTransportControllerTest::OnCandidatesGathered);
|
||||||
transport_controller_->SignalIceGatheringState.AddReceiver(
|
|
||||||
[this](cricket::IceGatheringState s) {
|
|
||||||
JsepTransportControllerTest::OnGatheringState(s);
|
|
||||||
});
|
|
||||||
transport_controller_->SignalIceCandidatesGathered.AddReceiver(
|
|
||||||
[this](const std::string& transport,
|
|
||||||
const std::vector<cricket::Candidate>& candidates) {
|
|
||||||
JsepTransportControllerTest::OnCandidatesGathered(transport,
|
|
||||||
candidates);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<cricket::SessionDescription>
|
std::unique_ptr<cricket::SessionDescription>
|
||||||
|
|
|
@ -529,52 +529,28 @@ bool PeerConnection::Initialize(
|
||||||
transport_controller_.reset(new JsepTransportController(
|
transport_controller_.reset(new JsepTransportController(
|
||||||
signaling_thread(), network_thread(), port_allocator_.get(),
|
signaling_thread(), network_thread(), port_allocator_.get(),
|
||||||
async_resolver_factory_.get(), config));
|
async_resolver_factory_.get(), config));
|
||||||
|
transport_controller_->SignalStandardizedIceConnectionState.connect(
|
||||||
|
this, &PeerConnection::SetStandardizedIceConnectionState);
|
||||||
|
transport_controller_->SignalConnectionState.connect(
|
||||||
|
this, &PeerConnection::SetConnectionState);
|
||||||
|
transport_controller_->SignalIceGatheringState.connect(
|
||||||
|
this, &PeerConnection::OnTransportControllerGatheringState);
|
||||||
|
transport_controller_->SignalIceCandidatesGathered.connect(
|
||||||
|
this, &PeerConnection::OnTransportControllerCandidatesGathered);
|
||||||
|
transport_controller_->SignalIceCandidateError.connect(
|
||||||
|
this, &PeerConnection::OnTransportControllerCandidateError);
|
||||||
|
transport_controller_->SignalIceCandidatesRemoved.connect(
|
||||||
|
this, &PeerConnection::OnTransportControllerCandidatesRemoved);
|
||||||
|
transport_controller_->SignalDtlsHandshakeError.connect(
|
||||||
|
this, &PeerConnection::OnTransportControllerDtlsHandshakeError);
|
||||||
|
transport_controller_->SignalIceCandidatePairChanged.connect(
|
||||||
|
this, &PeerConnection::OnTransportControllerCandidateChanged);
|
||||||
|
|
||||||
transport_controller_->SignalIceConnectionState.AddReceiver(
|
transport_controller_->SignalIceConnectionState.AddReceiver(
|
||||||
[this](cricket::IceConnectionState s) {
|
[this](cricket::IceConnectionState s) {
|
||||||
RTC_DCHECK_RUN_ON(signaling_thread());
|
RTC_DCHECK_RUN_ON(signaling_thread());
|
||||||
OnTransportControllerConnectionState(s);
|
OnTransportControllerConnectionState(s);
|
||||||
});
|
});
|
||||||
transport_controller_->SignalConnectionState.AddReceiver(
|
|
||||||
[this](PeerConnectionInterface::PeerConnectionState s) {
|
|
||||||
RTC_DCHECK_RUN_ON(signaling_thread());
|
|
||||||
SetConnectionState(s);
|
|
||||||
});
|
|
||||||
transport_controller_->SignalStandardizedIceConnectionState.AddReceiver(
|
|
||||||
[this](PeerConnectionInterface::IceConnectionState s) {
|
|
||||||
RTC_DCHECK_RUN_ON(signaling_thread());
|
|
||||||
SetStandardizedIceConnectionState(s);
|
|
||||||
});
|
|
||||||
transport_controller_->SignalIceGatheringState.AddReceiver(
|
|
||||||
[this](cricket::IceGatheringState s) {
|
|
||||||
RTC_DCHECK_RUN_ON(signaling_thread());
|
|
||||||
OnTransportControllerGatheringState(s);
|
|
||||||
});
|
|
||||||
transport_controller_->SignalIceCandidatesGathered.AddReceiver(
|
|
||||||
[this](const std::string& transport,
|
|
||||||
const std::vector<cricket::Candidate>& candidates) {
|
|
||||||
RTC_DCHECK_RUN_ON(signaling_thread());
|
|
||||||
OnTransportControllerCandidatesGathered(transport, candidates);
|
|
||||||
});
|
|
||||||
transport_controller_->SignalIceCandidateError.AddReceiver(
|
|
||||||
[this](const cricket::IceCandidateErrorEvent& event) {
|
|
||||||
RTC_DCHECK_RUN_ON(signaling_thread());
|
|
||||||
OnTransportControllerCandidateError(event);
|
|
||||||
});
|
|
||||||
transport_controller_->SignalIceCandidatesRemoved.AddReceiver(
|
|
||||||
[this](const std::vector<cricket::Candidate>& c) {
|
|
||||||
RTC_DCHECK_RUN_ON(signaling_thread());
|
|
||||||
OnTransportControllerCandidatesRemoved(c);
|
|
||||||
});
|
|
||||||
transport_controller_->SignalIceCandidatePairChanged.AddReceiver(
|
|
||||||
[this](const cricket::CandidatePairChangeEvent& event) {
|
|
||||||
RTC_DCHECK_RUN_ON(signaling_thread());
|
|
||||||
OnTransportControllerCandidateChanged(event);
|
|
||||||
});
|
|
||||||
transport_controller_->SignalDtlsHandshakeError.AddReceiver(
|
|
||||||
[this](rtc::SSLHandshakeError event) {
|
|
||||||
RTC_DCHECK_RUN_ON(signaling_thread());
|
|
||||||
OnTransportControllerDtlsHandshakeError(event);
|
|
||||||
});
|
|
||||||
|
|
||||||
stats_.reset(new StatsCollector(this));
|
stats_.reset(new StatsCollector(this));
|
||||||
stats_collector_ = RTCStatsCollector::Create(this);
|
stats_collector_ = RTCStatsCollector::Create(this);
|
||||||
|
|
|
@ -816,7 +816,6 @@ rtc_library("rtc_base") {
|
||||||
deps = [
|
deps = [
|
||||||
":checks",
|
":checks",
|
||||||
":deprecation",
|
":deprecation",
|
||||||
":robo_caller",
|
|
||||||
":rtc_task_queue",
|
":rtc_task_queue",
|
||||||
":stringutils",
|
":stringutils",
|
||||||
"../api:array_view",
|
"../api:array_view",
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
#include "rtc_base/openssl_adapter.h"
|
#include "rtc_base/openssl_adapter.h"
|
||||||
#include "rtc_base/openssl_digest.h"
|
#include "rtc_base/openssl_digest.h"
|
||||||
#include "rtc_base/openssl_identity.h"
|
#include "rtc_base/openssl_identity.h"
|
||||||
#include "rtc_base/robo_caller.h"
|
|
||||||
#include "rtc_base/ssl_certificate.h"
|
#include "rtc_base/ssl_certificate.h"
|
||||||
#include "rtc_base/stream.h"
|
#include "rtc_base/stream.h"
|
||||||
#include "rtc_base/task_utils/to_queued_task.h"
|
#include "rtc_base/task_utils/to_queued_task.h"
|
||||||
|
@ -932,7 +931,6 @@ int OpenSSLStreamAdapter::ContinueSSL() {
|
||||||
RTC_DLOG(LS_VERBOSE) << " -- error " << code << ", " << err_code << ", "
|
RTC_DLOG(LS_VERBOSE) << " -- error " << code << ", " << err_code << ", "
|
||||||
<< ERR_GET_REASON(err_code);
|
<< ERR_GET_REASON(err_code);
|
||||||
SignalSSLHandshakeError(ssl_handshake_err);
|
SignalSSLHandshakeError(ssl_handshake_err);
|
||||||
SSLHandshakeErrorSignal.Send(ssl_handshake_err);
|
|
||||||
return (ssl_error != 0) ? ssl_error : -1;
|
return (ssl_error != 0) ? ssl_error : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
|
|
||||||
#include "absl/memory/memory.h"
|
#include "absl/memory/memory.h"
|
||||||
#include "rtc_base/deprecation.h"
|
#include "rtc_base/deprecation.h"
|
||||||
#include "rtc_base/robo_caller.h"
|
|
||||||
#include "rtc_base/ssl_certificate.h"
|
#include "rtc_base/ssl_certificate.h"
|
||||||
#include "rtc_base/ssl_identity.h"
|
#include "rtc_base/ssl_identity.h"
|
||||||
#include "rtc_base/stream.h"
|
#include "rtc_base/stream.h"
|
||||||
|
@ -269,9 +268,7 @@ class SSLStreamAdapter : public StreamAdapterInterface {
|
||||||
// authentication.
|
// authentication.
|
||||||
bool GetClientAuthEnabled() const { return client_auth_enabled_; }
|
bool GetClientAuthEnabled() const { return client_auth_enabled_; }
|
||||||
|
|
||||||
// TODO(bugs.webrtc.org/11943): Remove sigslot and use one variable.
|
|
||||||
sigslot::signal1<SSLHandshakeError> SignalSSLHandshakeError;
|
sigslot::signal1<SSLHandshakeError> SignalSSLHandshakeError;
|
||||||
webrtc::RoboCaller<SSLHandshakeError> SSLHandshakeErrorSignal;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// If true (default), the client is required to provide a certificate during
|
// If true (default), the client is required to provide a certificate during
|
||||||
|
|
|
@ -165,12 +165,8 @@ void ScenarioIceConnectionImpl::SetRemoteSdp(SdpType type,
|
||||||
const std::string& remote_sdp) {
|
const std::string& remote_sdp) {
|
||||||
RTC_DCHECK_RUN_ON(signaling_thread_);
|
RTC_DCHECK_RUN_ON(signaling_thread_);
|
||||||
remote_description_ = webrtc::CreateSessionDescription(type, remote_sdp);
|
remote_description_ = webrtc::CreateSessionDescription(type, remote_sdp);
|
||||||
jsep_controller_->SignalIceCandidatesGathered.AddReceiver(
|
jsep_controller_->SignalIceCandidatesGathered.connect(
|
||||||
[this](const std::string& transport,
|
this, &ScenarioIceConnectionImpl::OnCandidates);
|
||||||
const std::vector<cricket::Candidate>& candidate) {
|
|
||||||
ScenarioIceConnectionImpl::OnCandidates(transport, candidate);
|
|
||||||
});
|
|
||||||
|
|
||||||
auto res = jsep_controller_->SetRemoteDescription(
|
auto res = jsep_controller_->SetRemoteDescription(
|
||||||
remote_description_->GetType(), remote_description_->description());
|
remote_description_->GetType(), remote_description_->description());
|
||||||
RTC_CHECK(res.ok()) << res.message();
|
RTC_CHECK(res.ok()) << res.message();
|
||||||
|
|
Loading…
Reference in a new issue