#include "third_party/blink/renderer/modules/peerconnection/webrtc_media_stream_track_adapter.h"
#include "base/strings/stringprintf.h"
#include "base/synchronization/waitable_event.h"
#include "base/task/single_thread_task_runner.h"
#include "third_party/blink/public/platform/modules/webrtc/webrtc_logging.h"
#include "third_party/blink/renderer/modules/mediastream/processed_local_audio_source.h"
#include "third_party/blink/renderer/modules/peerconnection/media_stream_video_webrtc_sink.h"
#include "third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.h"
#include "third_party/blink/renderer/platform/mediastream/media_stream_audio_track.h"
#include "third_party/blink/renderer/platform/scheduler/public/post_cross_thread_task.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_copier_base.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"
namespace {
void SendLogMessage(const std::string& message) { … }
}
namespace blink {
scoped_refptr<WebRtcMediaStreamTrackAdapter>
WebRtcMediaStreamTrackAdapter::CreateLocalTrackAdapter(
blink::PeerConnectionDependencyFactory* factory,
const scoped_refptr<base::SingleThreadTaskRunner>& main_thread,
MediaStreamComponent* component) { … }
scoped_refptr<WebRtcMediaStreamTrackAdapter>
WebRtcMediaStreamTrackAdapter::CreateRemoteTrackAdapter(
blink::PeerConnectionDependencyFactory* factory,
const scoped_refptr<base::SingleThreadTaskRunner>& main_thread,
const scoped_refptr<webrtc::MediaStreamTrackInterface>& webrtc_track) { … }
WebRtcMediaStreamTrackAdapter::WebRtcMediaStreamTrackAdapter(
blink::PeerConnectionDependencyFactory* factory,
const scoped_refptr<base::SingleThreadTaskRunner>& main_thread)
: … { … }
WebRtcMediaStreamTrackAdapter::~WebRtcMediaStreamTrackAdapter() { … }
void WebRtcMediaStreamTrackAdapterTraits::Destruct(
const WebRtcMediaStreamTrackAdapter* adapter) { … }
void WebRtcMediaStreamTrackAdapter::Dispose() { … }
bool WebRtcMediaStreamTrackAdapter::is_initialized() const { … }
void WebRtcMediaStreamTrackAdapter::InitializeOnMainThread() { … }
MediaStreamComponent* WebRtcMediaStreamTrackAdapter::track() { … }
rtc::scoped_refptr<webrtc::MediaStreamTrackInterface>
WebRtcMediaStreamTrackAdapter::webrtc_track() { … }
bool WebRtcMediaStreamTrackAdapter::IsEqual(MediaStreamComponent* component) { … }
void WebRtcMediaStreamTrackAdapter::InitializeLocalAudioTrack(
MediaStreamComponent* component) { … }
void WebRtcMediaStreamTrackAdapter::InitializeLocalVideoTrack(
MediaStreamComponent* component) { … }
void WebRtcMediaStreamTrackAdapter::InitializeRemoteAudioTrack(
const scoped_refptr<webrtc::AudioTrackInterface>& webrtc_audio_track,
ExecutionContext* track_execution_context) { … }
void WebRtcMediaStreamTrackAdapter::InitializeRemoteVideoTrack(
const scoped_refptr<webrtc::VideoTrackInterface>& webrtc_video_track,
ExecutionContext* track_execution_context) { … }
void WebRtcMediaStreamTrackAdapter::
FinalizeRemoteTrackInitializationOnMainThread() { … }
void WebRtcMediaStreamTrackAdapter::EnsureTrackIsInitialized() { … }
void WebRtcMediaStreamTrackAdapter::DisposeLocalAudioTrack() { … }
void WebRtcMediaStreamTrackAdapter::DisposeLocalVideoTrack() { … }
void WebRtcMediaStreamTrackAdapter::DisposeRemoteAudioTrack() { … }
void WebRtcMediaStreamTrackAdapter::DisposeRemoteVideoTrack() { … }
void WebRtcMediaStreamTrackAdapter::
UnregisterRemoteAudioTrackAdapterOnSignalingThread() { … }
void WebRtcMediaStreamTrackAdapter::FinalizeRemoteTrackDisposingOnMainThread() { … }
}