/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef MEDIA_CONDUIT_ABSTRACTION_ #define MEDIA_CONDUIT_ABSTRACTION_ #include #include #include #include "CodecConfig.h" #include "ImageContainer.h" #include "jsapi/RTCStatsReport.h" #include "MediaConduitErrors.h" #include "mozilla/media/MediaUtils.h" #include "mozilla/MozPromise.h" #include "WebrtcVideoCodecFactory.h" #include "nsTArray.h" #include "mozilla/dom/RTCRtpSourcesBinding.h" #include "PerformanceRecorder.h" #include "transport/mediapacket.h" #include "MediaConduitControl.h" // libwebrtc includes #include "api/audio/audio_frame.h" #include "api/call/transport.h" #include "api/rtp_headers.h" #include "api/rtp_parameters.h" #include "api/transport/rtp/rtp_source.h" #include "api/video/video_frame_buffer.h" #include "call/audio_receive_stream.h" #include "call/audio_send_stream.h" #include "call/call_basic_stats.h" #include "call/video_receive_stream.h" #include "call/video_send_stream.h" #include "rtc_base/copy_on_write_buffer.h" namespace webrtc { class RtpPacketReceived; class VideoFrame; } // namespace webrtc namespace mozilla { namespace dom { struct RTCRtpSourceEntry; } namespace dom { struct RTCRtpSourceEntry; } enum class MediaSessionConduitLocalDirection : int { kSend, kRecv }; class VideoSessionConduit; class AudioSessionConduit; class WebrtcCallWrapper; /** * 1. Abstract renderer for video data * 2. This class acts as abstract interface between the video-engine and * video-engine agnostic renderer implementation. * 3. Concrete implementation of this interface is responsible for * processing and/or rendering the obtained raw video frame to appropriate * output , say,