From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- .../webrtc/libwebrtcglue/MediaConduitControl.h | 77 ++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 dom/media/webrtc/libwebrtcglue/MediaConduitControl.h (limited to 'dom/media/webrtc/libwebrtcglue/MediaConduitControl.h') diff --git a/dom/media/webrtc/libwebrtcglue/MediaConduitControl.h b/dom/media/webrtc/libwebrtcglue/MediaConduitControl.h new file mode 100644 index 0000000000..a860fab146 --- /dev/null +++ b/dom/media/webrtc/libwebrtcglue/MediaConduitControl.h @@ -0,0 +1,77 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ +/* 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 DOM_MEDIA_WEBRTC_LIBWEBRTCGLUE_MEDIACONDUITCONTROL_H_ +#define DOM_MEDIA_WEBRTC_LIBWEBRTCGLUE_MEDIACONDUITCONTROL_H_ + +#include "jsapi/RTCDTMFSender.h" // For DtmfEvent +#include "mozilla/StateMirroring.h" +#include "RtpRtcpConfig.h" +#include +#include +#include "mozilla/Maybe.h" +#include "CodecConfig.h" // For Audio/VideoCodecConfig +#include "api/rtp_parameters.h" // For webrtc::RtpExtension +#include "api/video_codecs/video_codec.h" // For webrtc::VideoCodecMode + +namespace mozilla { + +using RtpExtList = std::vector; +using Ssrc = uint32_t; +using Ssrcs = std::vector; + +/** + * These are the interfaces used to control the async conduits. Some parameters + * are common, and some are tied to the conduit type. See + * MediaSessionConduit::InitConduitControl for how they are used. + * + * Put simply, the implementer of the interfaces below may set its canonicals on + * any thread, and the conduits will react to those changes accordingly, on + * their dedicated worker thread. One instance of these interfaces could control + * multiple conduits as each canonical can connect to any number of mirrors. + */ + +class MediaConduitControlInterface { + public: + virtual AbstractCanonical* CanonicalReceiving() = 0; + virtual AbstractCanonical* CanonicalTransmitting() = 0; + virtual AbstractCanonical* CanonicalLocalSsrcs() = 0; + virtual AbstractCanonical* CanonicalLocalCname() = 0; + virtual AbstractCanonical* CanonicalMid() = 0; + virtual AbstractCanonical* CanonicalRemoteSsrc() = 0; + virtual AbstractCanonical* CanonicalSyncGroup() = 0; + virtual AbstractCanonical* CanonicalLocalRecvRtpExtensions() = 0; + virtual AbstractCanonical* CanonicalLocalSendRtpExtensions() = 0; +}; + +class AudioConduitControlInterface : public MediaConduitControlInterface { + public: + virtual AbstractCanonical>* + CanonicalAudioSendCodec() = 0; + virtual AbstractCanonical>* + CanonicalAudioRecvCodecs() = 0; + virtual MediaEventSource& OnDtmfEvent() = 0; +}; + +class VideoConduitControlInterface : public MediaConduitControlInterface { + public: + virtual AbstractCanonical* CanonicalLocalVideoRtxSsrcs() = 0; + virtual AbstractCanonical* CanonicalRemoteVideoRtxSsrc() = 0; + virtual AbstractCanonical>* + CanonicalVideoSendCodec() = 0; + virtual AbstractCanonical>* + CanonicalVideoSendRtpRtcpConfig() = 0; + virtual AbstractCanonical>* + CanonicalVideoRecvCodecs() = 0; + virtual AbstractCanonical>* + CanonicalVideoRecvRtpRtcpConfig() = 0; + virtual AbstractCanonical* + CanonicalVideoCodecMode() = 0; +}; + +} // namespace mozilla + +#endif -- cgit v1.2.3