diff --git a/api/media_stream_proxy.h b/api/media_stream_proxy.h index 8ee33ca0ee..773c5d8b14 100644 --- a/api/media_stream_proxy.h +++ b/api/media_stream_proxy.h @@ -20,8 +20,8 @@ namespace webrtc { // TODO(deadbeef): Move this to .cc file and out of api/. What threads methods // are called on is an implementation detail. -BEGIN_SIGNALING_PROXY_MAP(MediaStream) -PROXY_SIGNALING_THREAD_DESTRUCTOR() +BEGIN_PRIMARY_PROXY_MAP(MediaStream) +PROXY_PRIMARY_THREAD_DESTRUCTOR() BYPASS_PROXY_CONSTMETHOD0(std::string, id) PROXY_METHOD0(AudioTrackVector, GetAudioTracks) PROXY_METHOD0(VideoTrackVector, GetVideoTracks) diff --git a/api/media_stream_track_proxy.h b/api/media_stream_track_proxy.h index 59dcb77244..a0fe676d58 100644 --- a/api/media_stream_track_proxy.h +++ b/api/media_stream_track_proxy.h @@ -24,8 +24,8 @@ namespace webrtc { // TODO(deadbeef): Move this to .cc file and out of api/. What threads methods // are called on is an implementation detail. -BEGIN_SIGNALING_PROXY_MAP(AudioTrack) -PROXY_SIGNALING_THREAD_DESTRUCTOR() +BEGIN_PRIMARY_PROXY_MAP(AudioTrack) +PROXY_PRIMARY_THREAD_DESTRUCTOR() BYPASS_PROXY_CONSTMETHOD0(std::string, kind) BYPASS_PROXY_CONSTMETHOD0(std::string, id) PROXY_CONSTMETHOD0(TrackState, state) @@ -41,7 +41,7 @@ PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*) END_PROXY_MAP() BEGIN_PROXY_MAP(VideoTrack) -PROXY_SIGNALING_THREAD_DESTRUCTOR() +PROXY_PRIMARY_THREAD_DESTRUCTOR() BYPASS_PROXY_CONSTMETHOD0(std::string, kind) BYPASS_PROXY_CONSTMETHOD0(std::string, id) PROXY_CONSTMETHOD0(TrackState, state) @@ -49,11 +49,11 @@ PROXY_CONSTMETHOD0(bool, enabled) PROXY_METHOD1(bool, set_enabled, bool) PROXY_CONSTMETHOD0(ContentHint, content_hint) PROXY_METHOD1(void, set_content_hint, ContentHint) -PROXY_WORKER_METHOD2(void, - AddOrUpdateSink, - rtc::VideoSinkInterface*, - const rtc::VideoSinkWants&) -PROXY_WORKER_METHOD1(void, RemoveSink, rtc::VideoSinkInterface*) +PROXY_SECONDARY_METHOD2(void, + AddOrUpdateSink, + rtc::VideoSinkInterface*, + const rtc::VideoSinkWants&) +PROXY_SECONDARY_METHOD1(void, RemoveSink, rtc::VideoSinkInterface*) PROXY_CONSTMETHOD0(VideoTrackSourceInterface*, GetSource) PROXY_METHOD1(void, RegisterObserver, ObserverInterface*) diff --git a/api/peer_connection_factory_proxy.h b/api/peer_connection_factory_proxy.h index 58a4272596..9056495655 100644 --- a/api/peer_connection_factory_proxy.h +++ b/api/peer_connection_factory_proxy.h @@ -22,8 +22,8 @@ namespace webrtc { // TODO(deadbeef): Move this to .cc file and out of api/. What threads methods // are called on is an implementation detail. -BEGIN_SIGNALING_PROXY_MAP(PeerConnectionFactory) -PROXY_SIGNALING_THREAD_DESTRUCTOR() +BEGIN_PRIMARY_PROXY_MAP(PeerConnectionFactory) +PROXY_PRIMARY_THREAD_DESTRUCTOR() PROXY_METHOD1(void, SetOptions, const Options&) PROXY_METHOD4(rtc::scoped_refptr, CreatePeerConnection, diff --git a/api/peer_connection_proxy.h b/api/peer_connection_proxy.h index 43802f11e7..b9bf80a998 100644 --- a/api/peer_connection_proxy.h +++ b/api/peer_connection_proxy.h @@ -26,7 +26,7 @@ namespace webrtc { // TODO(deadbeef): Move this to .cc file and out of api/. What threads methods // are called on is an implementation detail. BEGIN_PROXY_MAP(PeerConnection) -PROXY_SIGNALING_THREAD_DESTRUCTOR() +PROXY_PRIMARY_THREAD_DESTRUCTOR() PROXY_METHOD0(rtc::scoped_refptr, local_streams) PROXY_METHOD0(rtc::scoped_refptr, remote_streams) PROXY_METHOD1(bool, AddStream, MediaStreamInterface*) @@ -140,8 +140,8 @@ PROXY_WORKER_METHOD1(rtc::scoped_refptr, const std::string&) // This method will be invoked on the network thread. See // PeerConnectionFactory::CreatePeerConnectionOrError for more details. -PROXY_WORKER_CONSTMETHOD0(rtc::scoped_refptr, - GetSctpTransport) +PROXY_SECONDARY_CONSTMETHOD0(rtc::scoped_refptr, + GetSctpTransport) PROXY_METHOD0(SignalingState, signaling_state) PROXY_METHOD0(IceConnectionState, ice_connection_state) PROXY_METHOD0(IceConnectionState, standardized_ice_connection_state) diff --git a/api/proxy.h b/api/proxy.h index 05f7414bc0..3be9f93764 100644 --- a/api/proxy.h +++ b/api/proxy.h @@ -12,6 +12,13 @@ // PeerConnection classes. // TODO(deadbeef): Move this to pc/; this is part of the implementation. +// The proxied objects are initialized with either one or two thread +// objects that operations can be proxied to: The primary and secondary +// threads. +// In common usage, the primary thread will be the PeerConnection's +// signaling thread, and the secondary thread will be either the +// PeerConnection's worker thread or the PeerConnection's network thread. + // // Example usage: // @@ -29,22 +36,22 @@ // }; // // BEGIN_PROXY_MAP(Test) -// PROXY_SIGNALING_THREAD_DESTRUCTOR() +// PROXY_PRIMARY_THREAD_DESTRUCTOR() // PROXY_METHOD0(std::string, FooA) // PROXY_CONSTMETHOD1(std::string, FooB, arg1) -// PROXY_WORKER_METHOD1(std::string, FooC, arg1) +// PROXY_SECONDARY_METHOD1(std::string, FooC, arg1) // END_PROXY_MAP() // -// Where the destructor and first two methods are invoked on the signaling -// thread, and the third is invoked on the worker thread. +// Where the destructor and first two methods are invoked on the primary +// thread, and the third is invoked on the secondary thread. // // The proxy can be created using // // TestProxy::Create(Thread* signaling_thread, Thread* worker_thread, // TestInterface*). // -// The variant defined with BEGIN_SIGNALING_PROXY_MAP is unaware of -// the worker thread, and invokes all methods on the signaling thread. +// The variant defined with BEGIN_PRIMARY_PROXY_MAP is unaware of +// the secondary thread, and invokes all methods on the primary thread. // // The variant defined with BEGIN_OWNED_PROXY_MAP does not use // refcounting, and instead just takes ownership of the object being proxied. @@ -195,25 +202,25 @@ class ConstMethodCall : public QueuedTask { }; // clang-format on -#define SIGNALING_PROXY_MAP_BOILERPLATE(c) \ +#define PRIMARY_PROXY_MAP_BOILERPLATE(c) \ + protected: \ + c##ProxyWithInternal(rtc::Thread* primary_thread, INTERNAL_CLASS* c) \ + : primary_thread_(primary_thread), c_(c) {} \ + \ + private: \ + mutable rtc::Thread* primary_thread_; + +#define SECONDARY_PROXY_MAP_BOILERPLATE(c) \ protected: \ - c##ProxyWithInternal(rtc::Thread* signaling_thread, INTERNAL_CLASS* c) \ - : signaling_thread_(signaling_thread), c_(c) {} \ + c##ProxyWithInternal(rtc::Thread* primary_thread, \ + rtc::Thread* secondary_thread, INTERNAL_CLASS* c) \ + : primary_thread_(primary_thread), \ + secondary_thread_(secondary_thread), \ + c_(c) {} \ \ private: \ - mutable rtc::Thread* signaling_thread_; - -#define WORKER_PROXY_MAP_BOILERPLATE(c) \ - protected: \ - c##ProxyWithInternal(rtc::Thread* signaling_thread, \ - rtc::Thread* worker_thread, INTERNAL_CLASS* c) \ - : signaling_thread_(signaling_thread), \ - worker_thread_(worker_thread), \ - c_(c) {} \ - \ - private: \ - mutable rtc::Thread* signaling_thread_; \ - mutable rtc::Thread* worker_thread_; + mutable rtc::Thread* primary_thread_; \ + mutable rtc::Thread* secondary_thread_; // Note that the destructor is protected so that the proxy can only be // destroyed via RefCountInterface. @@ -246,89 +253,88 @@ class ConstMethodCall : public QueuedTask { void DestroyInternal() { delete c_; } \ INTERNAL_CLASS* c_; -#define BEGIN_SIGNALING_PROXY_MAP(c) \ - PROXY_MAP_BOILERPLATE(c) \ - SIGNALING_PROXY_MAP_BOILERPLATE(c) \ - REFCOUNTED_PROXY_MAP_BOILERPLATE(c) \ - public: \ - static rtc::scoped_refptr Create( \ - rtc::Thread* signaling_thread, INTERNAL_CLASS* c) { \ - return new rtc::RefCountedObject(signaling_thread, \ - c); \ +#define BEGIN_PRIMARY_PROXY_MAP(c) \ + PROXY_MAP_BOILERPLATE(c) \ + PRIMARY_PROXY_MAP_BOILERPLATE(c) \ + REFCOUNTED_PROXY_MAP_BOILERPLATE(c) \ + public: \ + static rtc::scoped_refptr Create( \ + rtc::Thread* primary_thread, INTERNAL_CLASS* c) { \ + return new rtc::RefCountedObject(primary_thread, c); \ } -#define BEGIN_PROXY_MAP(c) \ - PROXY_MAP_BOILERPLATE(c) \ - WORKER_PROXY_MAP_BOILERPLATE(c) \ - REFCOUNTED_PROXY_MAP_BOILERPLATE(c) \ - public: \ - static rtc::scoped_refptr Create( \ - rtc::Thread* signaling_thread, rtc::Thread* worker_thread, \ - INTERNAL_CLASS* c) { \ - return new rtc::RefCountedObject(signaling_thread, \ - worker_thread, c); \ +#define BEGIN_PROXY_MAP(c) \ + PROXY_MAP_BOILERPLATE(c) \ + SECONDARY_PROXY_MAP_BOILERPLATE(c) \ + REFCOUNTED_PROXY_MAP_BOILERPLATE(c) \ + public: \ + static rtc::scoped_refptr Create( \ + rtc::Thread* primary_thread, rtc::Thread* secondary_thread, \ + INTERNAL_CLASS* c) { \ + return new rtc::RefCountedObject( \ + primary_thread, secondary_thread, c); \ } #define BEGIN_OWNED_PROXY_MAP(c) \ PROXY_MAP_BOILERPLATE(c) \ - WORKER_PROXY_MAP_BOILERPLATE(c) \ + SECONDARY_PROXY_MAP_BOILERPLATE(c) \ OWNED_PROXY_MAP_BOILERPLATE(c) \ public: \ static std::unique_ptr Create( \ - rtc::Thread* signaling_thread, rtc::Thread* worker_thread, \ + rtc::Thread* primary_thread, rtc::Thread* secondary_thread, \ std::unique_ptr c) { \ return std::unique_ptr(new c##ProxyWithInternal( \ - signaling_thread, worker_thread, c.release())); \ + primary_thread, secondary_thread, c.release())); \ } -#define PROXY_SIGNALING_THREAD_DESTRUCTOR() \ +#define PROXY_PRIMARY_THREAD_DESTRUCTOR() \ + private: \ + rtc::Thread* destructor_thread() const { return primary_thread_; } \ + \ + public: // NOLINTNEXTLINE + +#define PROXY_SECONDARY_THREAD_DESTRUCTOR() \ private: \ - rtc::Thread* destructor_thread() const { return signaling_thread_; } \ + rtc::Thread* destructor_thread() const { return secondary_thread_; } \ \ public: // NOLINTNEXTLINE -#define PROXY_WORKER_THREAD_DESTRUCTOR() \ - private: \ - rtc::Thread* destructor_thread() const { return worker_thread_; } \ - \ - public: // NOLINTNEXTLINE - -#define PROXY_METHOD0(r, method) \ - r method() override { \ - MethodCall call(c_, &C::method); \ - return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ +#define PROXY_METHOD0(r, method) \ + r method() override { \ + MethodCall call(c_, &C::method); \ + return call.Marshal(RTC_FROM_HERE, primary_thread_); \ } -#define PROXY_CONSTMETHOD0(r, method) \ - r method() const override { \ - ConstMethodCall call(c_, &C::method); \ - return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ +#define PROXY_CONSTMETHOD0(r, method) \ + r method() const override { \ + ConstMethodCall call(c_, &C::method); \ + return call.Marshal(RTC_FROM_HERE, primary_thread_); \ } #define PROXY_METHOD1(r, method, t1) \ r method(t1 a1) override { \ MethodCall call(c_, &C::method, std::move(a1)); \ - return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ + return call.Marshal(RTC_FROM_HERE, primary_thread_); \ } #define PROXY_CONSTMETHOD1(r, method, t1) \ r method(t1 a1) const override { \ ConstMethodCall call(c_, &C::method, std::move(a1)); \ - return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ + return call.Marshal(RTC_FROM_HERE, primary_thread_); \ } #define PROXY_METHOD2(r, method, t1, t2) \ r method(t1 a1, t2 a2) override { \ MethodCall call(c_, &C::method, std::move(a1), \ std::move(a2)); \ - return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ + return call.Marshal(RTC_FROM_HERE, primary_thread_); \ } #define PROXY_METHOD3(r, method, t1, t2, t3) \ r method(t1 a1, t2 a2, t3 a3) override { \ MethodCall call(c_, &C::method, std::move(a1), \ std::move(a2), std::move(a3)); \ - return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ + return call.Marshal(RTC_FROM_HERE, primary_thread_); \ } #define PROXY_METHOD4(r, method, t1, t2, t3, t4) \ @@ -336,7 +342,7 @@ class ConstMethodCall : public QueuedTask { MethodCall call(c_, &C::method, std::move(a1), \ std::move(a2), std::move(a3), \ std::move(a4)); \ - return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ + return call.Marshal(RTC_FROM_HERE, primary_thread_); \ } #define PROXY_METHOD5(r, method, t1, t2, t3, t4, t5) \ @@ -344,60 +350,60 @@ class ConstMethodCall : public QueuedTask { MethodCall call(c_, &C::method, std::move(a1), \ std::move(a2), std::move(a3), \ std::move(a4), std::move(a5)); \ - return call.Marshal(RTC_FROM_HERE, signaling_thread_); \ + return call.Marshal(RTC_FROM_HERE, primary_thread_); \ } -// Define methods which should be invoked on the worker thread. -#define PROXY_WORKER_METHOD0(r, method) \ - r method() override { \ - MethodCall call(c_, &C::method); \ - return call.Marshal(RTC_FROM_HERE, worker_thread_); \ +// Define methods which should be invoked on the secondary thread. +#define PROXY_SECONDARY_METHOD0(r, method) \ + r method() override { \ + MethodCall call(c_, &C::method); \ + return call.Marshal(RTC_FROM_HERE, secondary_thread_); \ } -#define PROXY_WORKER_CONSTMETHOD0(r, method) \ - r method() const override { \ - ConstMethodCall call(c_, &C::method); \ - return call.Marshal(RTC_FROM_HERE, worker_thread_); \ +#define PROXY_SECONDARY_CONSTMETHOD0(r, method) \ + r method() const override { \ + ConstMethodCall call(c_, &C::method); \ + return call.Marshal(RTC_FROM_HERE, secondary_thread_); \ } -#define PROXY_WORKER_METHOD1(r, method, t1) \ +#define PROXY_SECONDARY_METHOD1(r, method, t1) \ r method(t1 a1) override { \ MethodCall call(c_, &C::method, std::move(a1)); \ - return call.Marshal(RTC_FROM_HERE, worker_thread_); \ + return call.Marshal(RTC_FROM_HERE, secondary_thread_); \ } -#define PROXY_WORKER_CONSTMETHOD1(r, method, t1) \ +#define PROXY_SECONDARY_CONSTMETHOD1(r, method, t1) \ r method(t1 a1) const override { \ ConstMethodCall call(c_, &C::method, std::move(a1)); \ - return call.Marshal(RTC_FROM_HERE, worker_thread_); \ + return call.Marshal(RTC_FROM_HERE, secondary_thread_); \ } -#define PROXY_WORKER_METHOD2(r, method, t1, t2) \ +#define PROXY_SECONDARY_METHOD2(r, method, t1, t2) \ r method(t1 a1, t2 a2) override { \ MethodCall call(c_, &C::method, std::move(a1), \ std::move(a2)); \ - return call.Marshal(RTC_FROM_HERE, worker_thread_); \ + return call.Marshal(RTC_FROM_HERE, secondary_thread_); \ } -#define PROXY_WORKER_CONSTMETHOD2(r, method, t1, t2) \ +#define PROXY_SECONDARY_CONSTMETHOD2(r, method, t1, t2) \ r method(t1 a1, t2 a2) const override { \ ConstMethodCall call(c_, &C::method, std::move(a1), \ std::move(a2)); \ - return call.Marshal(RTC_FROM_HERE, worker_thread_); \ + return call.Marshal(RTC_FROM_HERE, secondary_thread_); \ } -#define PROXY_WORKER_METHOD3(r, method, t1, t2, t3) \ +#define PROXY_SECONDARY_METHOD3(r, method, t1, t2, t3) \ r method(t1 a1, t2 a2, t3 a3) override { \ MethodCall call(c_, &C::method, std::move(a1), \ std::move(a2), std::move(a3)); \ - return call.Marshal(RTC_FROM_HERE, worker_thread_); \ + return call.Marshal(RTC_FROM_HERE, secondary_thread_); \ } -#define PROXY_WORKER_CONSTMETHOD3(r, method, t1, t2) \ +#define PROXY_SECONDARY_CONSTMETHOD3(r, method, t1, t2) \ r method(t1 a1, t2 a2, t3 a3) const override { \ ConstMethodCall call(c_, &C::method, std::move(a1), \ std::move(a2), std::move(a3)); \ - return call.Marshal(RTC_FROM_HERE, worker_thread_); \ + return call.Marshal(RTC_FROM_HERE, secondary_thread_); \ } // For use when returning purely const state (set during construction). diff --git a/api/rtp_receiver_interface.h b/api/rtp_receiver_interface.h index 8984d71fe8..e0ace545af 100644 --- a/api/rtp_receiver_interface.h +++ b/api/rtp_receiver_interface.h @@ -120,8 +120,8 @@ class RTC_EXPORT RtpReceiverInterface : public rtc::RefCountInterface { // Define proxy for RtpReceiverInterface. // TODO(deadbeef): Move this to .cc file and out of api/. What threads methods // are called on is an implementation detail. -BEGIN_SIGNALING_PROXY_MAP(RtpReceiver) -PROXY_SIGNALING_THREAD_DESTRUCTOR() +BEGIN_PRIMARY_PROXY_MAP(RtpReceiver) +PROXY_PRIMARY_THREAD_DESTRUCTOR() PROXY_CONSTMETHOD0(rtc::scoped_refptr, track) PROXY_CONSTMETHOD0(rtc::scoped_refptr, dtls_transport) PROXY_CONSTMETHOD0(std::vector, stream_ids) diff --git a/api/rtp_sender_interface.h b/api/rtp_sender_interface.h index a33b80042e..dd93792a07 100644 --- a/api/rtp_sender_interface.h +++ b/api/rtp_sender_interface.h @@ -104,8 +104,8 @@ class RTC_EXPORT RtpSenderInterface : public rtc::RefCountInterface { // Define proxy for RtpSenderInterface. // TODO(deadbeef): Move this to .cc file and out of api/. What threads methods // are called on is an implementation detail. -BEGIN_SIGNALING_PROXY_MAP(RtpSender) -PROXY_SIGNALING_THREAD_DESTRUCTOR() +BEGIN_PRIMARY_PROXY_MAP(RtpSender) +PROXY_PRIMARY_THREAD_DESTRUCTOR() PROXY_METHOD1(bool, SetTrack, MediaStreamTrackInterface*) PROXY_CONSTMETHOD0(rtc::scoped_refptr, track) PROXY_CONSTMETHOD0(rtc::scoped_refptr, dtls_transport) diff --git a/api/video_track_source_proxy.h b/api/video_track_source_proxy.h index 692ff6493f..0b60d20de5 100644 --- a/api/video_track_source_proxy.h +++ b/api/video_track_source_proxy.h @@ -21,27 +21,27 @@ namespace webrtc { // TODO(deadbeef): Move this to .cc file and out of api/. What threads methods // are called on is an implementation detail. BEGIN_PROXY_MAP(VideoTrackSource) -PROXY_SIGNALING_THREAD_DESTRUCTOR() +PROXY_PRIMARY_THREAD_DESTRUCTOR() PROXY_CONSTMETHOD0(SourceState, state) BYPASS_PROXY_CONSTMETHOD0(bool, remote) BYPASS_PROXY_CONSTMETHOD0(bool, is_screencast) PROXY_CONSTMETHOD0(absl::optional, needs_denoising) PROXY_METHOD1(bool, GetStats, Stats*) -PROXY_WORKER_METHOD2(void, - AddOrUpdateSink, - rtc::VideoSinkInterface*, - const rtc::VideoSinkWants&) -PROXY_WORKER_METHOD1(void, RemoveSink, rtc::VideoSinkInterface*) +PROXY_SECONDARY_METHOD2(void, + AddOrUpdateSink, + rtc::VideoSinkInterface*, + const rtc::VideoSinkWants&) +PROXY_SECONDARY_METHOD1(void, RemoveSink, rtc::VideoSinkInterface*) PROXY_METHOD1(void, RegisterObserver, ObserverInterface*) PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*) PROXY_CONSTMETHOD0(bool, SupportsEncodedOutput) -PROXY_WORKER_METHOD0(void, GenerateKeyFrame) -PROXY_WORKER_METHOD1(void, - AddEncodedSink, - rtc::VideoSinkInterface*) -PROXY_WORKER_METHOD1(void, - RemoveEncodedSink, - rtc::VideoSinkInterface*) +PROXY_SECONDARY_METHOD0(void, GenerateKeyFrame) +PROXY_SECONDARY_METHOD1(void, + AddEncodedSink, + rtc::VideoSinkInterface*) +PROXY_SECONDARY_METHOD1(void, + RemoveEncodedSink, + rtc::VideoSinkInterface*) END_PROXY_MAP() } // namespace webrtc diff --git a/pc/dtmf_sender.h b/pc/dtmf_sender.h index 76aa04fe6d..46145e5f3c 100644 --- a/pc/dtmf_sender.h +++ b/pc/dtmf_sender.h @@ -99,9 +99,9 @@ class DtmfSender : public DtmfSenderInterface, public sigslot::has_slots<> { }; // Define proxy for DtmfSenderInterface. -BEGIN_SIGNALING_PROXY_MAP(DtmfSender) +BEGIN_PRIMARY_PROXY_MAP(DtmfSender) -PROXY_SIGNALING_THREAD_DESTRUCTOR() +PROXY_PRIMARY_THREAD_DESTRUCTOR() PROXY_METHOD1(void, RegisterObserver, DtmfSenderObserverInterface*) PROXY_METHOD0(void, UnregisterObserver) PROXY_METHOD0(bool, CanInsertDtmf) diff --git a/pc/jitter_buffer_delay_proxy.h b/pc/jitter_buffer_delay_proxy.h index b3380fd258..91729d6935 100644 --- a/pc/jitter_buffer_delay_proxy.h +++ b/pc/jitter_buffer_delay_proxy.h @@ -20,10 +20,10 @@ namespace webrtc { BEGIN_PROXY_MAP(JitterBufferDelay) -PROXY_SIGNALING_THREAD_DESTRUCTOR() +PROXY_PRIMARY_THREAD_DESTRUCTOR() PROXY_METHOD2(void, OnStart, cricket::Delayable*, uint32_t) PROXY_METHOD0(void, OnStop) -PROXY_WORKER_METHOD1(void, Set, absl::optional) +PROXY_SECONDARY_METHOD1(void, Set, absl::optional) END_PROXY_MAP() } // namespace webrtc diff --git a/pc/proxy_unittest.cc b/pc/proxy_unittest.cc index 500828a03e..fdc7dc3e70 100644 --- a/pc/proxy_unittest.cc +++ b/pc/proxy_unittest.cc @@ -64,20 +64,20 @@ class Fake : public FakeInterface { // Proxies for the test interface. BEGIN_PROXY_MAP(Fake) -PROXY_WORKER_THREAD_DESTRUCTOR() +PROXY_SECONDARY_THREAD_DESTRUCTOR() PROXY_METHOD0(void, VoidMethod0) PROXY_METHOD0(std::string, Method0) PROXY_CONSTMETHOD0(std::string, ConstMethod0) -PROXY_WORKER_METHOD1(std::string, Method1, std::string) +PROXY_SECONDARY_METHOD1(std::string, Method1, std::string) PROXY_CONSTMETHOD1(std::string, ConstMethod1, std::string) -PROXY_WORKER_METHOD2(std::string, Method2, std::string, std::string) +PROXY_SECONDARY_METHOD2(std::string, Method2, std::string, std::string) END_PROXY_MAP() // Preprocessor hack to get a proxy class a name different than FakeProxy. #define FakeProxy FakeSignalingProxy #define FakeProxyWithInternal FakeSignalingProxyWithInternal -BEGIN_SIGNALING_PROXY_MAP(Fake) -PROXY_SIGNALING_THREAD_DESTRUCTOR() +BEGIN_PRIMARY_PROXY_MAP(Fake) +PROXY_PRIMARY_THREAD_DESTRUCTOR() PROXY_METHOD0(void, VoidMethod0) PROXY_METHOD0(std::string, Method0) PROXY_CONSTMETHOD0(std::string, ConstMethod0) @@ -270,7 +270,7 @@ class Foo : public FooInterface { }; BEGIN_OWNED_PROXY_MAP(Foo) -PROXY_SIGNALING_THREAD_DESTRUCTOR() +PROXY_PRIMARY_THREAD_DESTRUCTOR() PROXY_METHOD0(void, Bar) END_PROXY_MAP() diff --git a/pc/rtp_data_channel.cc b/pc/rtp_data_channel.cc index b08b2b2ffb..def4a07801 100644 --- a/pc/rtp_data_channel.cc +++ b/pc/rtp_data_channel.cc @@ -34,8 +34,8 @@ int GenerateUniqueId() { } // Define proxy for DataChannelInterface. -BEGIN_SIGNALING_PROXY_MAP(DataChannel) -PROXY_SIGNALING_THREAD_DESTRUCTOR() +BEGIN_PRIMARY_PROXY_MAP(DataChannel) +PROXY_PRIMARY_THREAD_DESTRUCTOR() PROXY_METHOD1(void, RegisterObserver, DataChannelObserver*) PROXY_METHOD0(void, UnregisterObserver) BYPASS_PROXY_CONSTMETHOD0(std::string, label) diff --git a/pc/rtp_transceiver.h b/pc/rtp_transceiver.h index 43f376ae5f..8d2d72857d 100644 --- a/pc/rtp_transceiver.h +++ b/pc/rtp_transceiver.h @@ -264,9 +264,9 @@ class RtpTransceiver final const std::function on_negotiation_needed_; }; -BEGIN_SIGNALING_PROXY_MAP(RtpTransceiver) +BEGIN_PRIMARY_PROXY_MAP(RtpTransceiver) -PROXY_SIGNALING_THREAD_DESTRUCTOR() +PROXY_PRIMARY_THREAD_DESTRUCTOR() BYPASS_PROXY_CONSTMETHOD0(cricket::MediaType, media_type) PROXY_CONSTMETHOD0(absl::optional, mid) PROXY_CONSTMETHOD0(rtc::scoped_refptr, sender) diff --git a/pc/sctp_data_channel.cc b/pc/sctp_data_channel.cc index c4357a8da6..f16eb8a521 100644 --- a/pc/sctp_data_channel.cc +++ b/pc/sctp_data_channel.cc @@ -38,8 +38,8 @@ int GenerateUniqueId() { } // Define proxy for DataChannelInterface. -BEGIN_SIGNALING_PROXY_MAP(DataChannel) -PROXY_SIGNALING_THREAD_DESTRUCTOR() +BEGIN_PRIMARY_PROXY_MAP(DataChannel) +PROXY_PRIMARY_THREAD_DESTRUCTOR() PROXY_METHOD1(void, RegisterObserver, DataChannelObserver*) PROXY_METHOD0(void, UnregisterObserver) BYPASS_PROXY_CONSTMETHOD0(std::string, label)