WebRtcMediaStreamTrackAdapter::web_track, webrtc_track and IsEqual should be callable from any thread and they should be const.
In order to make these methods accessible from any thread (and possibly make them const) the signaling of initialization must be redesigned in the event of remote tracks. Remote tracks are created on the signaling thread, initialization completes on the main thread. The main thread can call |EnsureTrackIsInitialized|, but the signaling thread would have to wait for a signal. Alternatively, enforce |is_initialized| and make |WebRtcMediaStreamTrackAdapterMap::GetRemoteTrackAdapter| wait for a signal as to always return initialized adapters.
Comment 1 by bugdroid1@chromium.org
, Jul 16