Avoid proxy thread hops for reading const properties.

This bypasses the proxy for the following properties:
* MediaStream::id()
* AudioTrack::kind() and AudioTrack::id()
* VideoTrack::kind() and VideoTrack::id()
* RtpReceiver::media_type() and RtpReceiver::id()
* RtpSender::media_type() and RtpSender::id()
* VideoTrackSource::remote() and VideoTrackSource::is_screencast()
* RtpTransceiver::media_type()

Bug: webrtc:11923
Change-Id: If7edea1781f778af3775515fc4af9a9e151c8103
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183767
Reviewed-by: Chen Xing <chxg@google.com>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32071}
This commit is contained in:
Tomas Gunnarsson
2020-09-10 13:04:50 +02:00
committed by Commit Bot
parent 8750c16f46
commit fc83cdc819
9 changed files with 14 additions and 15 deletions

View File

@ -244,7 +244,7 @@ class RtpTransceiver final
BEGIN_SIGNALING_PROXY_MAP(RtpTransceiver)
PROXY_SIGNALING_THREAD_DESTRUCTOR()
PROXY_CONSTMETHOD0(cricket::MediaType, media_type)
BYPASS_PROXY_CONSTMETHOD0(cricket::MediaType, media_type)
PROXY_CONSTMETHOD0(absl::optional<std::string>, mid)
PROXY_CONSTMETHOD0(rtc::scoped_refptr<RtpSenderInterface>, sender)
PROXY_CONSTMETHOD0(rtc::scoped_refptr<RtpReceiverInterface>, receiver)